|
|||||||||
| Home >> All >> org >> opennms >> netmgt >> [ poller overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.opennms.netmgt.poller
Class Poller

java.lang.Objectorg.opennms.netmgt.poller.Poller
- All Implemented Interfaces:
- org.opennms.core.fiber.Fiber, org.opennms.core.fiber.PausableFiber
- public final class Poller
- extends java.lang.Object
- implements org.opennms.core.fiber.PausableFiber
- extends java.lang.Object
| Field Summary | |
private static java.lang.String |
LOG4J_CATEGORY
|
private java.util.Map |
m_pollableNodes
Map of 'PollableNode' objects keyed by nodeId |
private java.util.List |
m_pollableServices
List of all PollableService objects. |
private BroadcastEventProcessor |
m_receiver
|
private org.opennms.netmgt.scheduler.Scheduler |
m_scheduler
|
private static java.util.Map |
m_serviceIds
Holds map of service names to service identifiers |
private static Poller |
m_singleton
|
private int |
m_status
|
private static java.util.Map |
m_svcMonitors
Map of all available 'ServiceMonitor' objects indexed by service name |
private static java.lang.String |
SQL_RETRIEVE_INTERFACES
|
private static java.lang.String |
SQL_RETRIEVE_SERVICE_IDS
|
private static java.lang.String |
SQL_RETRIEVE_SERVICE_STATUS
|
private static int |
WAIT_FOREVER
Integer constant for passing in to PollableNode.getNodeLock() method in order to indicate that the method should block until node lock is available. |
| Fields inherited from interface org.opennms.core.fiber.PausableFiber |
PAUSE_PENDING, PAUSED, RESUME_PENDING |
| Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
| Constructor Summary | |
private |
Poller()
|
| Method Summary | |
void |
addNode(PollableNode pNode)
|
static Poller |
getInstance()
|
java.lang.String |
getName()
This method is used to return the name of the Fiber. |
PollableNode |
getNode(int nodeId)
|
java.util.List |
getPollableServiceList()
|
org.opennms.netmgt.scheduler.Scheduler |
getScheduler()
|
static java.util.Date |
getServiceLostDate(java.sql.Connection dbConn,
int nodeId,
java.lang.String ipAddr,
java.lang.String svcName)
Determines the last known status of a ipaddr/service pair based on outage information from the 'outages' table and if the last known status is UNAVAILABLE returns a date object representing when the service was lost. |
ServiceMonitor |
getServiceMonitor(java.lang.String svcName)
|
int |
getStatus()
This method is used to get the current status of the Fiber. |
void |
init()
|
void |
pause()
This method is used to suspend a currently running Fiber |
void |
removeNode(int nodeId)
|
void |
resume()
This method is used to resume a suspeneded Fiber. |
private void |
scheduleExistingInterfaces()
|
void |
start()
This method is used to start the initilization process of the Fiber, which should eventually transition
to a RUNNING status. |
void |
stop()
This method is used to stop a currently running Fiber. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LOG4J_CATEGORY
private static final java.lang.String LOG4J_CATEGORY
- See Also:
- Constant Field Values
SQL_RETRIEVE_INTERFACES
private static final java.lang.String SQL_RETRIEVE_INTERFACES
- See Also:
- Constant Field Values
SQL_RETRIEVE_SERVICE_IDS
private static final java.lang.String SQL_RETRIEVE_SERVICE_IDS
- See Also:
- Constant Field Values
SQL_RETRIEVE_SERVICE_STATUS
private static final java.lang.String SQL_RETRIEVE_SERVICE_STATUS
- See Also:
- Constant Field Values
WAIT_FOREVER
private static int WAIT_FOREVER
- Integer constant for passing in to PollableNode.getNodeLock() method
in order to indicate that the method should block until node lock is
available.
m_singleton
private static final Poller m_singleton
m_serviceIds
private static final java.util.Map m_serviceIds
- Holds map of service names to service identifiers
m_pollableServices
private java.util.List m_pollableServices
- List of all PollableService objects.
m_scheduler
private org.opennms.netmgt.scheduler.Scheduler m_scheduler
m_status
private int m_status
m_receiver
private BroadcastEventProcessor m_receiver
m_pollableNodes
private java.util.Map m_pollableNodes
- Map of 'PollableNode' objects keyed by nodeId
m_svcMonitors
private static java.util.Map m_svcMonitors
- Map of all available 'ServiceMonitor' objects indexed by
service name
| Constructor Detail |
Poller
private Poller()
| Method Detail |
init
public void init()
start
public void start()
- Description copied from interface:
org.opennms.core.fiber.Fiber - This method is used to start the initilization process of
the
Fiber, which should eventually transition to aRUNNINGstatus.- Specified by:
startin interfaceorg.opennms.core.fiber.Fiber
stop
public void stop()
- Description copied from interface:
org.opennms.core.fiber.Fiber - This method is used to stop a currently running
Fiber. Once invoked theFibershould begin it's shutdown process. Depending on the implementation, this method may block until theFiberterminates.- Specified by:
stopin interfaceorg.opennms.core.fiber.Fiber
pause
public void pause()
- Description copied from interface:
org.opennms.core.fiber.PausableFiber - This method is used to suspend a currently running
Fiber. When invoked theFiberwill begin the transition to aPAUSEDstatus after changing its internal state, if applicable.- Specified by:
pausein interfaceorg.opennms.core.fiber.PausableFiber
resume
public void resume()
- Description copied from interface:
org.opennms.core.fiber.PausableFiber - This method is used to resume a suspeneded
Fiber. If the thread is already running then this method should have no effect on the currentFiber.- Specified by:
resumein interfaceorg.opennms.core.fiber.PausableFiber
getStatus
public int getStatus()
- Description copied from interface:
org.opennms.core.fiber.Fiber - This method is used to get the current status of the
Fiber. The status of the fiber should be one of the predefined constants of theFiberinterface, or from one of the derived interfaces.- Specified by:
getStatusin interfaceorg.opennms.core.fiber.Fiber
getName
public java.lang.String getName()
- Description copied from interface:
org.opennms.core.fiber.Fiber - This method is used to return the name of the
Fiber. The name of the instance is defined by the implementor, but it should be realitively unique when possible.- Specified by:
getNamein interfaceorg.opennms.core.fiber.Fiber
getInstance
public static Poller getInstance()
getScheduler
public org.opennms.netmgt.scheduler.Scheduler getScheduler()
getServiceMonitor
public ServiceMonitor getServiceMonitor(java.lang.String svcName)
getPollableServiceList
public java.util.List getPollableServiceList()
getNode
public PollableNode getNode(int nodeId)
addNode
public void addNode(PollableNode pNode)
removeNode
public void removeNode(int nodeId)
scheduleExistingInterfaces
private void scheduleExistingInterfaces()
throws java.sql.SQLException
getServiceLostDate
public static final java.util.Date getServiceLostDate(java.sql.Connection dbConn, int nodeId, java.lang.String ipAddr, java.lang.String svcName)
- Determines the last known status of a ipaddr/service pair based on outage information
from the 'outages' table and if the last known status is UNAVAILABLE returns a
date object representing when the service was lost. If last known status is
AVAILABLE null is returned.
|
|||||||||
| Home >> All >> org >> opennms >> netmgt >> [ poller overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.opennms.netmgt.poller.Poller