Package uk.co.westhawk.snmp.beans
Class OneNTSharedResBean
java.lang.Object
uk.co.westhawk.snmp.beans.SNMPBean
uk.co.westhawk.snmp.beans.SNMPRunBean
uk.co.westhawk.snmp.beans.OneNTSharedResBean
This bean collects information about one NT shared resource 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:
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.OneNTSharedResBean
(String h, int p) The constructor that will set the host and the port no.OneNTSharedResBean
(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 sending the SNMP request.Returns the comment associated with the NT shared resource.getIndex()
Returns the index of the NT shared resource.Returns the date of the moment when this bean was last updated.getName()
Returns the name of the NT shared resource.getPath()
Returns the local name (path) of the NT shared resource.void
run()
The run method according to the Runnable interface.void
Sets the index of the NT shared resource that will be requested.void
update
(Observable obs, Object ov) The update method according to the Observer interface, it will be 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
-
Constructor Details
-
OneNTSharedResBean
public OneNTSharedResBean()The default constructor. -
OneNTSharedResBean
The constructor that will set the host and the port no.- Parameters:
h
- the hostnamep
- the port no- See Also:
-
OneNTSharedResBean
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
-
setIndex
Sets the index of the NT shared resource that will be requested.- Parameters:
ind
- the index- See Also:
-
getIndex
Returns the index of the NT shared resource.- Returns:
- the index
- See Also:
-
getName
Returns the name of the NT shared resource.- Returns:
- the name
-
getPath
Returns the local name (path) of the NT shared resource.- Returns:
- the path
-
getComment
Returns the comment associated with the NT shared resource.- Returns:
- the comment
-
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
-
action
public void action()This method starts sending the SNMP request. All properties should be set before this method is called. The actual sending will take place in the run method. It makes a new snmp context and initialises all variables before starting. -
run
public void run()The run method according to the Runnable interface. This method will send the Pdu request, if the previous one is not still in flight.- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classSNMPRunBean
- See Also:
-
update
The update method according to the Observer interface, it will be called when the Pdu response is received. The property change event is fired.
-