public class NcdPerfDataBean extends SNMPBean implements java.beans.PropertyChangeListener
This bean collects information about a IBM Network Computer.
This class uses the NCDware v3.2 MIB, which was very kindly provided to me by Network Computing Devices, inc (NCD). This MIB is an extention of the older versions of the MIB
The properties in the parent classes should be set, before calling the action() method. Via a PropertyChangeEvent the application/applet will be notified.
SNMPBean.setHost(java.lang.String)
,
SNMPBean.setPort(int)
,
SNMPBean.setCommunityName(java.lang.String)
,
setUpdateInterval(int)
,
setUpdateInterval(String)
,
SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
SNMPBean.action()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
memoryPropertyName
Used as propertyName when a propertyChangeEvent is fired because
the memory was updated
|
static java.lang.String |
messagePropertyName
Used as propertyName when a propertyChangeEvent is fired because
a message was set
|
static java.lang.String |
noLogin
Used as name when no one is logged in.
|
static java.lang.String |
noName
Used as name when the name is not available.
|
static java.lang.String |
speedPropertyName
Used as propertyName when a propertyChangeEvent is fired because
the speed was updated
|
static java.lang.String |
userPropertyName
Used as propertyName when a propertyChangeEvent is fired because
the user name was updated
|
bindAddr, community, context, host, message, port, propertyChangeListener, socketType
Constructor and Description |
---|
NcdPerfDataBean()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
action()
This method starts sending the SNMP request.
|
java.util.Date |
getLastUpdateDate()
Returns the date of the moment when this bean was last updated.
|
long |
getMemory()
Returns the amount of RAM memory in bytes which is
currently available.
|
long |
getSpeed()
Returns the speed (bits per second) of the ethernet card interface.
|
int |
getUpdateInterval()
Returns the update interval.
|
java.lang.String |
getUserName()
Returns the login name of the user that is logged in.
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
This method is called when a new value of the speed, memory, user or
message is available.
|
protected void |
setMessage(java.lang.String st)
Returns the message (if any).
|
void |
setUpdateInterval(int i)
Sets the update interval.
|
void |
setUpdateInterval(java.lang.String i)
Sets the update interval as String.
|
addPropertyChangeListener, firePropertyChange, getBindAddress, getCommunityName, getHost, getMessage, getPort, getSocketType, isHostPortReachable, removePropertyChangeListener, setBindAddress, setCommunityName, setHost, setPort, setPort, setSocketType
public static final java.lang.String speedPropertyName
public static final java.lang.String memoryPropertyName
public static final java.lang.String userPropertyName
public static final java.lang.String messagePropertyName
public static final java.lang.String noLogin
public static final java.lang.String noName
public long getSpeed()
public long getMemory()
public java.lang.String getUserName()
public int getUpdateInterval()
setUpdateInterval(int)
,
setUpdateInterval(String)
public void setUpdateInterval(int i)
i
- the interval in msecgetUpdateInterval()
,
setUpdateInterval(String)
public void setUpdateInterval(java.lang.String i)
i
- the interval in msec as StringgetUpdateInterval()
,
setUpdateInterval(int)
public java.util.Date getLastUpdateDate()
public void action()
protected void setMessage(java.lang.String st)
SNMPBean
setMessage
in class SNMPBean
st
- the message stringSNMPBean.getMessage()
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
speedPropertyName
,
memoryPropertyName
,
userPropertyName
,
messagePropertyName