|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.poller.PollableNode
The PollableNode class...
Field Summary | |
private static java.lang.String |
EVENT_SOURCE
|
private java.util.Map |
m_interfaces
Map of 'PollableInterface' objects keyed by IP address |
private boolean |
m_isDeleted
|
private boolean |
m_isLocked
|
private java.lang.Object |
m_lock
Used to lock access to the PollableNode during a poll() |
private int |
m_nodeId
nodeId |
private int |
m_status
last known/current status of the node |
private boolean |
m_statusChangedFlag
Set by poll() method. |
Constructor Summary | |
PollableNode(int nodeId)
Constructor. |
Method Summary | |
void |
addInterface(PollableInterface pInterface)
|
private Event |
createEvent(java.lang.String uei,
java.net.InetAddress address,
java.lang.String svcName,
java.util.Date date)
|
void |
deleteAllInterfaces()
|
void |
generateEvents()
|
PollableInterface |
getInterface(java.lang.String ipAddress)
|
java.util.Collection |
getInterfaces()
|
private java.lang.String |
getIntNodeLabel(java.net.InetAddress ipaddr)
Retrieve nodeLabel from the node table of the database given a particular IP Address. |
int |
getNodeId()
|
private java.lang.String |
getNodeLabel(int nodeId)
Retrieve nodeLabel from the node table of the database given a particular nodeId. |
boolean |
getNodeLock(long timeout)
|
int |
getStatus()
|
boolean |
isDeleted()
|
void |
markAsDeleted()
|
int |
poll(PollableService pSvc)
Invokes a poll of the remote interface. |
void |
recalculateStatus()
Responsible for recalculating this node's UP/DOWN status. |
void |
releaseNodeLock()
|
void |
removeInterface(PollableInterface pInterface)
|
void |
resetStatusChanged()
|
boolean |
statusChanged()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int m_nodeId
private int m_status
private boolean m_statusChangedFlag
private java.util.Map m_interfaces
private java.lang.Object m_lock
private boolean m_isLocked
private boolean m_isDeleted
private static final java.lang.String EVENT_SOURCE
Constructor Detail |
public PollableNode(int nodeId)
Method Detail |
public int getNodeId()
public java.util.Collection getInterfaces()
public void addInterface(PollableInterface pInterface)
public void deleteAllInterfaces()
public PollableInterface getInterface(java.lang.String ipAddress)
public void removeInterface(PollableInterface pInterface)
public int getStatus()
public boolean statusChanged()
public void resetStatusChanged()
public void markAsDeleted()
public boolean isDeleted()
public void recalculateStatus()
public boolean getNodeLock(long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public void releaseNodeLock() throws java.lang.InterruptedException
java.lang.InterruptedException
public void generateEvents()
private Event createEvent(java.lang.String uei, java.net.InetAddress address, java.lang.String svcName, java.util.Date date)
private java.lang.String getNodeLabel(int nodeId) throws java.sql.SQLException
nodeId
- Node identifier
java.sql.SQLException
- if database error encounteredprivate java.lang.String getIntNodeLabel(java.net.InetAddress ipaddr) throws java.sql.SQLException
ipaddr
- Interface IP Address
java.sql.SQLException
- if database error encounteredpublic int poll(PollableService pSvc)
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |