Package org.opennms.netmgt.poller
Class Poller
- java.lang.Object
-
- org.opennms.netmgt.daemon.AbstractServiceDaemon
-
- org.opennms.netmgt.poller.Poller
-
- All Implemented Interfaces:
Fiber
,PausableFiber
,SpringServiceDaemon
,ServiceDaemon
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class Poller extends AbstractServiceDaemon
Poller class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
-
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
-
-
Constructor Summary
Constructors Constructor Description Poller()
Constructor for Poller.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventIpcManager
getEventIpcManager()
getEventIpcManagerEventIpcManager
getEventManager()
getEventManagerorg.opennms.netmgt.poller.PollerEventProcessor
getEventProcessor()
getEventProcessorstatic java.lang.String
getLoggingCategory()
PollableNetwork
getNetwork()
getNetworklong
getNumPolls()
Returns the number of polls that have been executed so far.PollerConfig
getPollerConfig()
getPollerConfigQueryManager
getQueryManager()
getQueryManagerScheduler
getScheduler()
getSchedulerprotected void
onInit()
onInitprotected void
onPause()
onPauseprotected void
onResume()
onResumeprotected void
onStart()
onStartprotected void
onStop()
onStopboolean
pollableServiceInPackage(java.lang.String ipAddr, java.lang.String serviceName, Package pkg)
void
refreshServicePackages()
void
scheduleService(int nodeId, java.lang.String nodeLabel, java.lang.String nodeLocation, java.lang.String ipAddr, java.lang.String svcName, PollableNode pollableNode)
scheduleServicevoid
setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManagervoid
setEventProcessor(org.opennms.netmgt.poller.PollerEventProcessor eventProcessor)
setEventProcessorvoid
setLocationAwarePollerClient(LocationAwarePollerClient locationAwarePollerClient)
void
setMonitoredServiceDao(MonitoredServiceDao monitoredServiceDao)
void
setNetwork(PollableNetwork network)
setNetworkvoid
setOutageDao(OutageDao outageDao)
void
setPersisterFactory(PersisterFactory persisterFactory)
void
setPollerConfig(PollerConfig pollerConfig)
setPollerConfigvoid
setScheduler(LegacyScheduler scheduler)
setSchedulervoid
setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
-
Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon
afterPropertiesSet, destroy, getName, getStatus, getStatusText, init, isPaused, isRunning, isStarting, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus
-
-
-
-
Method Detail
-
setPersisterFactory
public void setPersisterFactory(PersisterFactory persisterFactory)
-
setOutageDao
public void setOutageDao(OutageDao outageDao)
-
setMonitoredServiceDao
public void setMonitoredServiceDao(MonitoredServiceDao monitoredServiceDao)
-
setTransactionTemplate
public void setTransactionTemplate(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
-
setEventIpcManager
public void setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManager
- Parameters:
eventIpcManager
- aorg.opennms.netmgt.model.events.EventIpcManager
object.
-
getEventIpcManager
public EventIpcManager getEventIpcManager()
getEventIpcManager
- Returns:
- a
org.opennms.netmgt.model.events.EventIpcManager
object.
-
getEventManager
public EventIpcManager getEventManager()
getEventManager
- Returns:
- a
EventIpcManager
object.
-
getEventProcessor
public org.opennms.netmgt.poller.PollerEventProcessor getEventProcessor()
getEventProcessor
- Returns:
- a
PollerEventProcessor
object.
-
setEventProcessor
public void setEventProcessor(org.opennms.netmgt.poller.PollerEventProcessor eventProcessor)
setEventProcessor
- Parameters:
eventProcessor
- aPollerEventProcessor
object.
-
getNetwork
public PollableNetwork getNetwork()
getNetwork
- Returns:
- a
PollableNetwork
object.
-
setNetwork
public void setNetwork(PollableNetwork network)
setNetwork
- Parameters:
network
- aPollableNetwork
object.
-
getQueryManager
public QueryManager getQueryManager()
getQueryManager
- Returns:
- a
QueryManager
object.
-
getPollerConfig
public PollerConfig getPollerConfig()
getPollerConfig
- Returns:
- a
PollerConfig
object.
-
setPollerConfig
public void setPollerConfig(PollerConfig pollerConfig)
setPollerConfig
- Parameters:
pollerConfig
- aPollerConfig
object.
-
setScheduler
public void setScheduler(LegacyScheduler scheduler)
setScheduler
- Parameters:
scheduler
- aLegacyScheduler
object.
-
setLocationAwarePollerClient
public void setLocationAwarePollerClient(LocationAwarePollerClient locationAwarePollerClient)
-
onInit
protected void onInit()
onInit
- Specified by:
onInit
in classAbstractServiceDaemon
-
onStart
protected void onStart()
onStart
- Overrides:
onStart
in classAbstractServiceDaemon
-
onStop
protected void onStop()
onStop
- Overrides:
onStop
in classAbstractServiceDaemon
-
onPause
protected void onPause()
onPause
- Overrides:
onPause
in classAbstractServiceDaemon
-
onResume
protected void onResume()
onResume
- Overrides:
onResume
in classAbstractServiceDaemon
-
scheduleService
public void scheduleService(int nodeId, java.lang.String nodeLabel, java.lang.String nodeLocation, java.lang.String ipAddr, java.lang.String svcName, PollableNode pollableNode)
scheduleService
- Parameters:
nodeId
- a int.nodeLabel
- aString
object.nodeLocation
- aString
object.ipAddr
- aString
object.svcName
- aString
object.pollableNode
- aPollableNode
object
-
pollableServiceInPackage
public boolean pollableServiceInPackage(java.lang.String ipAddr, java.lang.String serviceName, Package pkg)
-
refreshServicePackages
public void refreshServicePackages()
-
getNumPolls
public long getNumPolls()
Returns the number of polls that have been executed so far.- Returns:
- the number of polls that have been executed
-
getLoggingCategory
public static java.lang.String getLoggingCategory()
-
-