|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.poller.Poller
| 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 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()
|
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 |
private static final java.lang.String LOG4J_CATEGORY
private static final java.lang.String SQL_RETRIEVE_INTERFACES
private static final java.lang.String SQL_RETRIEVE_SERVICE_IDS
private static final java.lang.String SQL_RETRIEVE_SERVICE_STATUS
private static int WAIT_FOREVER
private static final Poller m_singleton
private static final java.util.Map m_serviceIds
private java.util.List m_pollableServices
private Scheduler m_scheduler
private int m_status
private BroadcastEventProcessor m_receiver
private java.util.Map m_pollableNodes
private static java.util.Map m_svcMonitors
| Constructor Detail |
private Poller()
| Method Detail |
public void init()
public void start()
FiberFiber, which should eventually transition
to a RUNNING status.
start in interface Fiberpublic void stop()
FiberFiber.
Once invoked the Fiber should begin it's shutdown
process. Depending on the implementation, this method may block
until the Fiber terminates.
stop in interface Fiberpublic void pause()
PausableFiberFiber.
When invoked the Fiber will begin the transition to
a PAUSED status after changing its internal state, if
applicable.
- Specified by:
pause in interface PausableFiber
public void resume()
PausableFiberFiber.
If the thread is already running then this method should have
no effect on the current Fiber.
resume in interface PausableFiberpublic int getStatus()
FiberFiber.
The status of the fiber should be one of the predefined constants
of the Fiber interface, or from one of the derived
interfaces.
getStatus in interface FiberFiber.public java.lang.String getName()
FiberFiber.
The name of the instance is defined by the implementor, but it
should be realitively unique when possible.
getName in interface FiberFiber.public static Poller getInstance()
public Scheduler getScheduler()
public ServiceMonitor getServiceMonitor(java.lang.String svcName)
public java.util.List getPollableServiceList()
public PollableNode getNode(int nodeId)
public void addNode(PollableNode pNode)
public void removeNode(int nodeId)
private void scheduleExistingInterfaces()
throws java.sql.SQLException
java.sql.SQLException
public static final java.util.Date getServiceLostDate(java.sql.Connection dbConn,
int nodeId,
java.lang.String ipAddr,
java.lang.String svcName)
dbConn - Database connectionnodeId - Node identifieripAddr - IP addresssvcName - service name
|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||