org.opennms.netmgt.poller.pollables
Class PollableServiceConfig

java.lang.Object
  extended by 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
PollableServiceConfig(PollableService svc, PollerConfig pollerConfig, PollOutagesConfig pollOutagesConfig, Package pkg, Timer timer)
          Constructor for PollableServiceConfig.
 
Method Summary
 long getCurrentTime()
          getCurrentTime
 long getInterval()
          getInterval
 PollStatus poll()
          poll
 void refresh()
          Uses the existing package name to try and re-obtain the package from the poller config factory.
 void refreshThresholds()
          Should be called when thresholds configuration has been reloaded
 boolean scheduledSuspension()
          scheduledSuspension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollableServiceConfig

public PollableServiceConfig(PollableService svc,
                             PollerConfig pollerConfig,
                             PollOutagesConfig pollOutagesConfig,
                             Package pkg,
                             Timer timer)

Constructor for PollableServiceConfig.

Parameters:
svc - a PollableService object.
pollerConfig - a PollerConfig object.
pollOutagesConfig - a PollOutagesConfig object.
pkg - a Package object.
timer - a Timer object.
Method Detail

poll

public PollStatus poll()

poll

Specified by:
poll in interface PollConfig
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 interface PollConfig

refreshThresholds

public void refreshThresholds()
Should be called when thresholds configuration has been reloaded

Specified by:
refreshThresholds in interface PollConfig

getCurrentTime

public long getCurrentTime()

getCurrentTime

Specified by:
getCurrentTime in interface PollConfig
Specified by:
getCurrentTime in interface Timer
Returns:
a long.

getInterval

public long getInterval()

getInterval

Specified by:
getInterval in interface ScheduleInterval
Returns:
a long.

scheduledSuspension

public boolean scheduledSuspension()

scheduledSuspension

Specified by:
scheduledSuspension in interface ScheduleInterval
Returns:
a boolean.


Copyright © 2011. All Rights Reserved.