Package uk.co.westhawk.snmp.beans
Class NTUserNamesBean
java.lang.Object
uk.co.westhawk.snmp.beans.SNMPBean
uk.co.westhawk.snmp.beans.SNMPRunBean
uk.co.westhawk.snmp.beans.NTUserNamesBean
This bean collects the names of the network users installed on a NT server. The NT mib is described in the LAN Manager MIB II for Windows NT Objects . You will have to register to the MSDN before accessing this page.
The properties in the parent classes should be set, before calling the action() method. Via a PropertyChangeEvent the application/applet will be notified.
- Version:
- $Revision: 1.13 $ $Date: 2006/01/25 18:08:56 $
- Author:
- Birgit Arkesteijn
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.NTUserNamesBean
(String h, int p) The constructor that will set the host and the port no.NTUserNamesBean
(String h, int p, String b) The constructor that will set the host, the port no and the local bind address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
action()
This method starts the action of the bean.int
getCount()
Returns the number of NT network users.Returns the index of one of the users.Returns the indices of the NT network users.Returns the date of the moment when this bean was last updated.getNames()
Returns the names of the NT network users (the list of svUserName).void
run()
Implements the running of the bean.void
update
(Observable obs, Object ov) This method is called when the Pdu response is received.Methods inherited from class uk.co.westhawk.snmp.beans.SNMPRunBean
getUpdateInterval, isRunning, setRunning, setUpdateInterval, setUpdateInterval
Methods inherited from class uk.co.westhawk.snmp.beans.SNMPBean
addPropertyChangeListener, getBindAddress, getCommunityName, getHost, getMessage, getPort, getSocketType, removePropertyChangeListener, setBindAddress, setCommunityName, setHost, setPort, setPort, setSocketType
-
Field Details
-
svUserName
- See Also:
-
-
Constructor Details
-
NTUserNamesBean
public NTUserNamesBean()The default constructor. -
NTUserNamesBean
The constructor that will set the host and the port no.- Parameters:
h
- the hostnamep
- the port no- See Also:
-
NTUserNamesBean
The constructor that will set the host, the port no and the local bind address.- Parameters:
h
- the hostnamep
- the port nob
- the local bind address- Since:
- 4_14
- See Also:
-
-
Method Details
-
getLastUpdateDate
Returns the date of the moment when this bean was last updated. This might be null when the first time the update was not finished.- Returns:
- the last update date
-
getIndices
Returns the indices of the NT network users. The OID of this network user is a concatenation of the name (svUserName) OID and the network user specific index. The index should be used to get the other properties of this user.- See Also:
-
getIndex
Returns the index of one of the users. The OID of this network user is a concatenation of the name (svUserName) OID and the network user specific index. The index should be used to get the other properties of this user.- Parameters:
name
- The name of the user- Returns:
- the user index, might be null if no user with such name exists
- See Also:
-
getNames
Returns the names of the NT network users (the list of svUserName). -
getCount
public int getCount()Returns the number of NT network users. -
action
public void action()This method starts the action of the bean. It will initialises all variables before starting. -
run
public void run()Implements the running of the bean. It will send the Pdu, if the previous one is not still in flight.- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classSNMPRunBean
- See Also:
-
update
This method is called when the Pdu response is received. When all answers are received it will fire the property change event. The answers are stored in a hashtable, this is done because the speed can only be calculated with the previous answer.
-