OpenNMS API 1.1.3

org.opennms.netmgt.poller
Class PollableInterface

java.lang.Object
  extended byorg.opennms.netmgt.poller.PollableInterface
All Implemented Interfaces:
Pollable

public class PollableInterface
extends java.lang.Object
implements Pollable

The PollableInterface class...

Author:
Mike, OpenNMS

Field Summary
private  java.net.InetAddress m_address
          IP address of this interface
private  PollableNode m_node
          node that this interface belongs to
private  java.util.List m_pollableServices
          Reference to the list of all scheduled services
private  Scheduler m_scheduler
          Reference to the poller scheduler
private  java.util.Map m_services
          Map of 'PollableService' objects keyed by service name
private  int m_status
          Last known/current status
private  boolean m_statusChangedFlag
          Set by poll() method.
 
Fields inherited from interface org.opennms.netmgt.poller.Pollable
STATUS_DOWN, STATUS_UNKNOWN, STATUS_UP, statusType
 
Constructor Summary
PollableInterface(PollableNode node, java.net.InetAddress address)
          Constructor.
 
Method Summary
 void addService(PollableService service)
          Add a PollableService object to the services map keyed by service name.
 void deleteAllServices()
           
 java.net.InetAddress getAddress()
          Return the address of this interface
 PollableNode getNode()
          Return the node this interface belongs to
 PollableService getService(java.lang.String svcName)
           
 java.util.Collection getServices()
           
 int getStatus()
          Returns current status of the object
 int poll(PollableService pSvc)
          Invokes a poll of the service.
 void recalculateStatus()
          Responsible for recalculating the UP/DOWN status of the interface.
 void removeService(PollableService service)
           
 void resetStatusChanged()
           
 boolean statusChanged()
           
 boolean supportsService(java.lang.String svcName)
          Takes a service and returns true if this interface supports the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_node

private PollableNode m_node
node that this interface belongs to


m_address

private java.net.InetAddress m_address
IP address of this interface


m_status

private int m_status
Last known/current status


m_services

private java.util.Map m_services
Map of 'PollableService' objects keyed by service name


m_statusChangedFlag

private boolean m_statusChangedFlag
Set by poll() method.


m_scheduler

private Scheduler m_scheduler
Reference to the poller scheduler


m_pollableServices

private java.util.List m_pollableServices
Reference to the list of all scheduled services

Constructor Detail

PollableInterface

public PollableInterface(PollableNode node,
                         java.net.InetAddress address)
Constructor.

Method Detail

getNode

public PollableNode getNode()
Return the node this interface belongs to


getAddress

public java.net.InetAddress getAddress()
Return the address of this interface


getServices

public java.util.Collection getServices()

getService

public PollableService getService(java.lang.String svcName)

addService

public void addService(PollableService service)
Add a PollableService object to the services map keyed by service name. WARNING: For node outage processing we are only interested in testing a particular service once regardless of how many times the service is actually scheduled for polling (due to inclusion by multiple packages), therefore note that only the LAST pollable service added to the interface is actually saved in the services map. Any existing entry is simply replaced.


removeService

public void removeService(PollableService service)

deleteAllServices

public void deleteAllServices()

supportsService

public boolean supportsService(java.lang.String svcName)
Takes a service and returns true if this interface supports the service. Returns false otherwise.


getStatus

public int getStatus()
Description copied from interface: Pollable
Returns current status of the object

Specified by:
getStatus in interface Pollable

statusChanged

public boolean statusChanged()
Specified by:
statusChanged in interface Pollable

resetStatusChanged

public void resetStatusChanged()

recalculateStatus

public void recalculateStatus()
Responsible for recalculating the UP/DOWN status of the interface.


poll

public int poll(PollableService pSvc)

Invokes a poll of the service.

If the service changes status then node outage processing will be invoked and the status of the entire interface will be evaluated.


OpenNMS API 1.1.3

Generated by root on August 19 2004 0130.