Class PollableServiceConfig
- java.lang.Object
-
- org.opennms.netmgt.poller.pollables.PollableServiceConfig
-
- All Implemented Interfaces:
PollConfig
,ScheduleInterval
,Timer
public class PollableServiceConfig extends java.lang.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 long
getCurrentTime()
getCurrentTimelong
getInterval()
getIntervalint
getNodeId()
java.lang.String
getPackageName()
PollStatus
poll()
pollvoid
refresh()
Uses the existing package name to try and re-obtain the package from the poller config factory.boolean
scheduledSuspension()
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
- aPollableService
object.pollerConfig
- aPollerConfig
object.pkg
- aPackage
object.timer
- aTimer
object.
-
-
Method Detail
-
poll
public PollStatus poll()
poll
- Specified by:
poll
in interfacePollConfig
- Returns:
- a
PollStatus
object.
-
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:
refresh
in interfacePollConfig
-
getCurrentTime
public long getCurrentTime()
getCurrentTime
- Specified by:
getCurrentTime
in interfacePollConfig
- Specified by:
getCurrentTime
in interfaceTimer
- Returns:
- a long.
-
getInterval
public long getInterval()
getInterval
- Specified by:
getInterval
in interfaceScheduleInterval
- Returns:
- a long.
-
scheduledSuspension
public boolean scheduledSuspension()
scheduledSuspension
- Specified by:
scheduledSuspension
in interfaceScheduleInterval
- Returns:
- a boolean.
-
getPackageName
public java.lang.String getPackageName()
-
getNodeId
public int getNodeId()
-
-