| 
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | 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| Fields inherited from class uk.co.westhawk.snmp.beans.SNMPBean | 
community, context, host, message, port, propertyChangeListener | 
| Constructor Summary | |
IsHostReachableBean()
The default constructor.  | 
|
IsHostReachableBean(java.lang.String h,
                    int p)
The constructor that will set the host and the port no.  | 
|
| Method Summary | |
 void | 
action()
This method actually performs the request.  | 
protected  void | 
action(boolean wait)
 | 
 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, getCommunityName, getHost, getMessage, getPort, isHostPortReachable, removePropertyChangeListener, setCommunityName, setHost, setMessage, setPort, setPort | 
| 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)| 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
SnmpContext, 
action(), 
Pdu.waitForSelf()
public void action()
            throws PduException,
                   java.io.IOException
action in class SNMPBeanSnmpContext
protected void action(boolean wait)
               throws PduException,
                      java.io.IOException
public void update(java.util.Observable obs,
                   java.lang.Object ov)
update in interface java.util.Observer
  | 
SNMP Stack 4_12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||