|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.westhawk.snmp.beans.SNMPBean | +--uk.co.westhawk.snmp.beans.IsHostReachableBean
This bean will determine whether the host+port is up, by sending an UpSincePdu.
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)
,
SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)
,
SNMPBean.action()
,
UpSincePdu
Field Summary |
Fields inherited from class uk.co.westhawk.snmp.beans.SNMPBean |
bindAddr, community, context, host, message, port, propertyChangeListener, socketType |
Constructor Summary | |
IsHostReachableBean()
The default constructor. |
|
IsHostReachableBean(java.lang.String h,
int p)
The constructor that will set the host and the port no. |
|
IsHostReachableBean(java.lang.String h,
int p,
java.lang.String b)
The constructor that will set the host, the port no and the local bind address. |
Method Summary | |
void |
action()
This method actually performs the request. |
protected void |
action(boolean wait)
|
void |
freeResources()
Destroys the context. |
java.util.Date |
getUpSinceDate()
Returns the date when the host went up. |
boolean |
isReachable()
Indicates whether the host + port is reachable. |
protected void |
setReachable(boolean b)
The reachable property is set according to the succes of making a connection and the response of the SNMP request. |
protected void |
setUpSinceDate(java.util.Date d)
Answer is set according to the received SNMP response. |
void |
update(java.util.Observable obs,
java.lang.Object ov)
The update method according to the Observer interface, it will be called when the Pdu response is received. |
void |
waitForSelfAction()
This method performs the request and wait for it. |
Methods inherited from class uk.co.westhawk.snmp.beans.SNMPBean |
addPropertyChangeListener, firePropertyChange, getBindAddress, getCommunityName, getHost, getMessage, getPort, getSocketType, isHostPortReachable, removePropertyChangeListener, setBindAddress, setCommunityName, setHost, setMessage, setPort, setPort, setSocketType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IsHostReachableBean()
public IsHostReachableBean(java.lang.String h, int p)
h
- the hostnamep
- the port noSNMPBean.setHost(java.lang.String)
,
SNMPBean.setPort(int)
public IsHostReachableBean(java.lang.String h, int p, java.lang.String b)
h
- the hostnamep
- the port nob
- the local bind addressSNMPBean.setHost(java.lang.String)
,
SNMPBean.setPort(int)
,
SNMPBean.setBindAddress(java.lang.String)
Method Detail |
public java.util.Date getUpSinceDate()
SNMPBean.getMessage()
,
isReachable()
protected void setUpSinceDate(java.util.Date d)
getUpSinceDate()
public boolean isReachable()
SNMPBean.getMessage()
,
getUpSinceDate()
protected void setReachable(boolean b)
isReachable()
,
SNMPBean.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void waitForSelfAction() throws PduException, java.io.IOException
PduException
java.io.IOException
SnmpContext
,
action()
,
Pdu.waitForSelf()
public void action() throws PduException, java.io.IOException
action
in class SNMPBean
PduException
java.io.IOException
SnmpContext
protected void action(boolean wait) throws PduException, java.io.IOException
PduException
java.io.IOException
public void update(java.util.Observable obs, java.lang.Object ov)
update
in interface java.util.Observer
public void freeResources()
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |