|
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
This bean forms the base of the SNMP beans.
The bean will only come into action when the method action() is called. This should be done after the properties have been set.
This bean also provide the methods for adding and removing property change listeners and firing property change events.
SNMPRunBean
,
IsHostReachableBean
,
OneInterfaceBean
,
InterfaceIndexesBean
Field Summary | |
protected java.lang.String |
community
|
protected SnmpContext |
context
|
protected java.lang.String |
host
|
protected java.lang.String |
message
|
protected int |
port
|
protected java.util.Vector |
propertyChangeListener
|
Constructor Summary | |
SNMPBean()
The default constructor. |
|
SNMPBean(java.lang.String h,
int p)
The constructor that will set the host and the port no. |
Method Summary | |
abstract void |
action()
This method should send the SNMP request. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a property change listener. |
protected void |
firePropertyChange(java.lang.String property,
java.lang.Object old_v,
java.lang.Object new_v)
Fire the property event. |
java.lang.String |
getCommunityName()
Returns the community name that is used to send the SNMP request. |
java.lang.String |
getHost()
Returns the host (name or ipadress) which is addressed. |
java.lang.String |
getMessage()
Returns the message (if any). |
int |
getPort()
Returns the port no which is used. |
protected boolean |
isHostPortReachable()
Indicates whether the host is reachable. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a property change listener. |
void |
setCommunityName(java.lang.String c)
Sets the community name that is used to send the SNMP request. |
void |
setHost(java.lang.String h)
Sets the host (name or ipadress) which will be asked for the SNMP request. |
protected void |
setMessage(java.lang.String st)
Returns the message (if any). |
void |
setPort(int p)
Sets the port no which is used. |
void |
setPort(java.lang.String p)
Sets the port no which is used as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SnmpContext context
protected java.lang.String host
protected int port
protected java.lang.String community
protected java.lang.String message
protected java.util.Vector propertyChangeListener
Constructor Detail |
public SNMPBean()
public SNMPBean(java.lang.String h, int p)
h
- the hostnamep
- the port nosetHost(java.lang.String)
,
setPort(int)
Method Detail |
public abstract void action() throws PduException, java.io.IOException
public java.lang.String getHost()
setHost(java.lang.String)
public void setHost(java.lang.String h)
getHost()
public int getPort()
setPort(int)
,
setPort(String)
public void setPort(int p)
p
- The number of the portgetPort()
,
setPort(String)
public void setPort(java.lang.String p)
p
- The number of the port as a StringgetPort()
,
setPort(int)
public java.lang.String getCommunityName()
setCommunityName(java.lang.String)
public void setCommunityName(java.lang.String c)
getCommunityName()
protected boolean isHostPortReachable()
SnmpContext
public java.lang.String getMessage()
protected void setMessage(java.lang.String st)
st
- the message stringgetMessage()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener(java.beans.PropertyChangeListener)
protected void firePropertyChange(java.lang.String property, java.lang.Object old_v, java.lang.Object new_v)
removePropertyChangeListener(java.beans.PropertyChangeListener)
,
addPropertyChangeListener(java.beans.PropertyChangeListener)
,
PropertyChangeEvent
,
PropertyChangeListener
|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |