OpenNMS API 1.2.9

## org.opennms.netmgt.poller
Class Poller

    java.lang.Object
      org.opennms.netmgt.poller.Poller

All Implemented Interfaces:
  Fiber, PausableFiber

public final class Poller
extends java.lang.Object
implements PausableFiber

Nested Class Summary
`private static class` `Poller.InitCause`

Field Summary
`static java.lang.String` `EVENT_SOURCE`
`private DbConnectionFactory` `m_dbConnectionFactory`
`private EventIpcManager` `m_eventMgr`
`private boolean` `m_initialized`
`private PollableNetwork` `m_network`
`private PollerConfig` `m_pollerConfig`
`private PollOutagesConfig` `m_pollOutagesConfig`
`private QueryManager` `m_queryMgr`
`private PollerEventProcessor` `m_receiver`
`private Scheduler` `m_scheduler`
`private static Poller` `m_singleton`
`private int` `m_status`
`private java.util.Map` `m_svcIdToName`
`private java.util.Map` `m_svcNameToId`

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
`Poller()`

Method Summary
`void` `closeOutagesForInterface(java.util.Date closeDate, int eventId, int nodeId, java.lang.String ipAddr)`
`void` `closeOutagesForNode(java.util.Date closeDate, int eventId, int nodeId)`
`void` `closeOutagesForService(java.util.Date closeDate, int eventId, int nodeId, java.lang.String ipAddr, java.lang.String serviceName)`
`private void` `closeOutagesForUnmanagedServices()`
`Event` `createEvent(java.lang.String uei, int nodeId, java.net.InetAddress address, java.lang.String svcName, java.util.Date date)`
`private void` `createScheduler()`
`private void` `createServiceMaps()`
`private Package` `findPackageForService(java.lang.String ipAddr, java.lang.String serviceName)`
`EventIpcManager` `getEventManager()`
`static Poller` `getInstance()`
`java.lang.String` `getName()` This method is used to return the name of the `Fiber`.
`PollableNetwork` `getNetwork()`
`(package private) PollerConfig` `getPollerConfig()`
`(package private) PollOutagesConfig` `getPollOutagesConfig()`
`(package private) QueryManager` `getQueryMgr()`
`Scheduler` `getScheduler()`
`(package private) int` `getServiceIdByName(java.lang.String svcName)`
`ServiceMonitor` `getServiceMonitor(java.lang.String svcName)`
`private java.util.Map` `getServiceMonitors()`
`(package private) java.lang.String` `getServiceNameById(int svcId)`
`int` `getStatus()` This method is used to get the current status of the `Fiber`.
`void` `init()`
`boolean` `packageIncludesIfAndSvc(Package pkg, java.lang.String ipAddr, java.lang.String svcName)`
`void` `pause()` This method is used to suspend a currently running `Fiber`.``
`private boolean` `pollableServiceInPackage(java.lang.String ipAddr, java.lang.String serviceName, Package pkg)`
`void` `refreshServicePackages()`
`void` `resume()` This method is used to resume a suspeneded `Fiber`.
`private void` `scheduleExistingServices()`
`private int` `scheduleMatchingServices(java.lang.String criteria)`
`void` `scheduleService(int nodeId, java.lang.String ipAddr, java.lang.String svcName)`
`private void` `scheduleService(int nodeId, java.lang.String ipAddr, java.lang.String serviceName, java.lang.Number svcLostEventId, java.util.Date date, java.lang.String svcLostUei)`
`void` `setDbConnectionFactory(DbConnectionFactory dbConnectionFactory)`
`void` `setEventManager(EventIpcManager eventMgr)`
`void` `setPollerConfig(PollerConfig pollerConfig)`
`void` `setPollOutagesConfig(PollOutagesConfig pollOutagesConfig)`
`(package private) void` `setQueryMgr(QueryManager queryMgr)`
`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

### m_singleton

    private static final Poller m_singleton

### m_status

    private int m_status

### m_initialized

    private boolean m_initialized

### m_svcNameToId

    private java.util.Map m_svcNameToId

### m_svcIdToName

    private java.util.Map m_svcIdToName

### m_scheduler

    private Scheduler m_scheduler

### m_receiver

    private PollerEventProcessor m_receiver

### m_network

    private PollableNetwork m_network

### m_queryMgr

    private QueryManager m_queryMgr

### m_pollerConfig

    private PollerConfig m_pollerConfig

### m_pollOutagesConfig

    private PollOutagesConfig m_pollOutagesConfig

### m_eventMgr

    private EventIpcManager m_eventMgr

### m_dbConnectionFactory

    private DbConnectionFactory m_dbConnectionFactory

### EVENT_SOURCE

    public static final java.lang.String EVENT_SOURCE

See Also:
  Constant Field Values

Constructor Detail

### Poller

    public Poller()

Method Detail

### init

    public void init()

### closeOutagesForUnmanagedServices

    private void closeOutagesForUnmanagedServices()

### closeOutagesForNode

    public void closeOutagesForNode(java.util.Date closeDate,
                                    int eventId,
                                    int nodeId)

### closeOutagesForInterface

    public void closeOutagesForInterface(java.util.Date closeDate,
                                         int eventId,
                                         int nodeId,
                                         java.lang.String ipAddr)

### closeOutagesForService

    public void closeOutagesForService(java.util.Date closeDate,
                                       int eventId,
                                       int nodeId,
                                       java.lang.String ipAddr,
                                       java.lang.String serviceName)

### createScheduler

    private void createScheduler()

### createServiceMaps

    private void createServiceMaps()

### start

    public void start()

  Description copied from interface: `Fiber`
  This method is used to start the initilization process of the `Fiber`, which should eventually transition to a `RUNNING` status.

  Specified by:
    `start` in interface `Fiber`

### stop

    public void stop()

  Description copied from interface: `Fiber`
  This method is used to stop a currently running `Fiber`. Once invoked the `Fiber` should begin it's shutdown process. Depending on the implementation, this method may block until the `Fiber` terminates.

  Specified by:
    `stop` in interface `Fiber`

### pause

    public void pause()

  Description copied from interface: `PausableFiber`
  This method is used to suspend a currently running `Fiber`. 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`

### resume

    public void resume()

  Description copied from interface: `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 current `Fiber`.

  Specified by:
    `resume` in interface `PausableFiber`

### getStatus

    public int getStatus()

  Description copied from interface: `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 the `Fiber` interface, or from one of the derived interfaces.

  Specified by:
    `getStatus` in interface `Fiber`
  Returns:
    The current status of the `Fiber`.

### getName

    public java.lang.String getName()

  Description copied from interface: `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:
    `getName` in interface `Fiber`
  Returns:
    The name of the `Fiber`.

### getInstance

    public static Poller getInstance()

### getScheduler

    public Scheduler getScheduler()

### getServiceMonitor

    public ServiceMonitor getServiceMonitor(java.lang.String svcName)

### getNetwork

    public PollableNetwork getNetwork()

### scheduleExistingServices

    private void scheduleExistingServices()
                                   throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### scheduleService

    public void scheduleService(int nodeId,
                                java.lang.String ipAddr,
                                java.lang.String svcName)

### scheduleMatchingServices

    private int scheduleMatchingServices(java.lang.String criteria)

### scheduleService

    private void scheduleService(int nodeId,
                                 java.lang.String ipAddr,
                                 java.lang.String serviceName,
                                 java.lang.Number svcLostEventId,
                                 java.util.Date date,
                                 java.lang.String svcLostUei)

### findPackageForService

    private Package findPackageForService(java.lang.String ipAddr,
                                          java.lang.String serviceName)

### pollableServiceInPackage

    private boolean pollableServiceInPackage(java.lang.String ipAddr,
                                             java.lang.String serviceName,
                                             Package pkg)

### packageIncludesIfAndSvc

    public boolean packageIncludesIfAndSvc(Package pkg,
                                           java.lang.String ipAddr,
                                           java.lang.String svcName)

### getPollerConfig

    PollerConfig getPollerConfig()

  Returns:

### setPollerConfig

    public void setPollerConfig(PollerConfig pollerConfig)

### getPollOutagesConfig

    PollOutagesConfig getPollOutagesConfig()

### setPollOutagesConfig

    public void setPollOutagesConfig(PollOutagesConfig pollOutagesConfig)

### getEventManager

    public EventIpcManager getEventManager()

### setEventManager

    public void setEventManager(EventIpcManager eventMgr)

### getServiceMonitors

    private java.util.Map getServiceMonitors()

  Returns:
    Returns the m_svcMonitors.

### getServiceIdByName

    int getServiceIdByName(java.lang.String svcName)

### getServiceNameById

    java.lang.String getServiceNameById(int svcId)

### setQueryMgr

    void setQueryMgr(QueryManager queryMgr)

  Parameters:
    `queryMgr` - The queryMgr to set.

### getQueryMgr

    QueryManager getQueryMgr()

  Returns:
    Returns the queryMgr.

### setDbConnectionFactory

    public void setDbConnectionFactory(DbConnectionFactory dbConnectionFactory)

### createEvent

    public Event createEvent(java.lang.String uei,
                             int nodeId,
                             java.net.InetAddress address,
                             java.lang.String svcName,
                             java.util.Date date)

### refreshServicePackages

    public void refreshServicePackages()

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.