Class PollableServiceConfig
- java.lang.Object
-
- org.opennms.netmgt.poller.pollables.PollableServiceConfig
-
- All Implemented Interfaces:
PollConfig,ScheduleInterval,Timer
public class PollableServiceConfig extends Object implements PollConfig, ScheduleInterval
Represents a PollableServiceConfig- Version:
- $Id: $
- Author:
- Mathew Brozowski
-
-
Constructor Summary
Constructors Constructor Description PollableServiceConfig(PollableService svc, PollerConfig pollerConfig, Package pkg, Timer timer, PersisterFactory persisterFactory, ThresholdingService thresholdingService, LocationAwarePollerClient locationAwarePollerClient, ReadablePollOutagesDao pollOutagesDao)Constructor for PollableServiceConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCurrentTime()getCurrentTimelonggetInterval()getIntervalintgetNodeId()StringgetPackageName()PollStatuspoll()pollvoidrefresh()Uses the existing package name to try and re-obtain the package from the poller config factory.booleanscheduledSuspension()scheduledSuspension
-
-
-
Constructor Detail
-
PollableServiceConfig
public PollableServiceConfig(PollableService svc, PollerConfig pollerConfig, Package pkg, Timer timer, PersisterFactory persisterFactory, ThresholdingService thresholdingService, LocationAwarePollerClient locationAwarePollerClient, ReadablePollOutagesDao pollOutagesDao)
Constructor for PollableServiceConfig.
- Parameters:
svc- aPollableServiceobject.pollerConfig- aPollerConfigobject.pkg- aPackageobject.timer- aTimerobject.
-
-
Method Detail
-
poll
public PollStatus poll()
poll
- Specified by:
pollin interfacePollConfig- Returns:
- a
PollStatusobject.
-
refresh
public void refresh()
Uses the existing package name to try and re-obtain the package from the poller config factory. Should be called when the poller config has been reloaded.- Specified by:
refreshin interfacePollConfig
-
getCurrentTime
public long getCurrentTime()
getCurrentTime
- Specified by:
getCurrentTimein interfacePollConfig- Specified by:
getCurrentTimein interfaceTimer- Returns:
- a long.
-
getInterval
public long getInterval()
getInterval
- Specified by:
getIntervalin interfaceScheduleInterval- Returns:
- a long.
-
scheduledSuspension
public boolean scheduledSuspension()
scheduledSuspension
- Specified by:
scheduledSuspensionin interfaceScheduleInterval- Returns:
- a boolean.
-
getPackageName
public String getPackageName()
-
getNodeId
public int getNodeId()
-
-