org.opennms.netmgt.poller.remote.support
Class ServerUnreachableAdaptor

java.lang.Object
  extended by org.opennms.netmgt.poller.remote.support.ServerUnreachableAdaptor
All Implemented Interfaces:
PollerBackEnd

public class ServerUnreachableAdaptor
extends Object
implements PollerBackEnd

Author:
Mathew Brozowski, DJ Gregor

Constructor Summary
ServerUnreachableAdaptor()
           
 
Method Summary
 void checkForDisconnectedMonitors()
           
 void configurationUpdated()
           
 Collection<OnmsMonitoringLocationDefinition> getMonitoringLocations()
          Return the set of available MonitoringLocationDefinitions
 String getMonitorName(int locationMonitorId)
          Get monitor name
 PollerConfiguration getPollerConfiguration(int locationMonitorId)
          Gets the poller configuration assigned to this monitoring location
 Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
          Get service monitor locators for creating serviceMonitors for the poller.
 OnmsLocationMonitor.MonitorStatus pollerCheckingIn(int locationMonitorId, Date currentConfigurationVersion)
          Checkin with the backend to let it know that the poller is still alive and to find out if there are any configuration changes.
 boolean pollerStarting(int locationMonitorId, Map<String,String> pollerDetails)
          Notifies the backend that a registered poller is starting
 void pollerStopping(int locationMonitorId)
          Notifies the backend that a registered poller is stopping
 int registerLocationMonitor(String monitoringLocationId)
          Register a new location monitor
 void reportResult(int locationMonitorID, int serviceId, PollStatus status)
          Report a poll result from the client to the server.
 void setRemoteBackEnd(PollerBackEnd remoteBackEnd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerUnreachableAdaptor

public ServerUnreachableAdaptor()
Method Detail

setRemoteBackEnd

public void setRemoteBackEnd(PollerBackEnd remoteBackEnd)

checkForDisconnectedMonitors

public void checkForDisconnectedMonitors()
Specified by:
checkForDisconnectedMonitors in interface PollerBackEnd

configurationUpdated

public void configurationUpdated()
Specified by:
configurationUpdated in interface PollerBackEnd

getMonitoringLocations

public Collection<OnmsMonitoringLocationDefinition> getMonitoringLocations()
Description copied from interface: PollerBackEnd
Return the set of available MonitoringLocationDefinitions

Specified by:
getMonitoringLocations in interface PollerBackEnd

getPollerConfiguration

public PollerConfiguration getPollerConfiguration(int locationMonitorId)
Description copied from interface: PollerBackEnd
Gets the poller configuration assigned to this monitoring location

Specified by:
getPollerConfiguration in interface PollerBackEnd
Parameters:
locationMonitorId - the id of the requesting location monitor
Returns:
the PollerConfiguration for the indicicated location monitor

pollerCheckingIn

public OnmsLocationMonitor.MonitorStatus pollerCheckingIn(int locationMonitorId,
                                                          Date currentConfigurationVersion)
Description copied from interface: PollerBackEnd
Checkin with the backend to let it know that the poller is still alive and to find out if there are any configuration changes.

Specified by:
pollerCheckingIn in interface PollerBackEnd
Parameters:
locationMonitorId - the id of the location monitor that is checking in
currentConfigurationVersion - the version of the configuration that the location monitor is currently using
Returns:
true if the configuration should be updated.

pollerStarting

public boolean pollerStarting(int locationMonitorId,
                              Map<String,String> pollerDetails)
Description copied from interface: PollerBackEnd
Notifies the backend that a registered poller is starting

Specified by:
pollerStarting in interface PollerBackEnd
Parameters:
locationMonitorId - the id of the requesting location monitor
pollerDetails - TODO

pollerStopping

public void pollerStopping(int locationMonitorId)
Description copied from interface: PollerBackEnd
Notifies the backend that a registered poller is stopping

Specified by:
pollerStopping in interface PollerBackEnd
Parameters:
locationMonitorId - the id of the requesting location monitor

registerLocationMonitor

public int registerLocationMonitor(String monitoringLocationId)
Description copied from interface: PollerBackEnd
Register a new location monitor

Specified by:
registerLocationMonitor in interface PollerBackEnd
Parameters:
monitoringLocationId - the id of the monitoredLocation to associate with this location monitor
Returns:
the id of the new locations monitor

reportResult

public void reportResult(int locationMonitorID,
                         int serviceId,
                         PollStatus status)
Description copied from interface: PollerBackEnd
Report a poll result from the client to the server.

Specified by:
reportResult in interface PollerBackEnd
Parameters:
locationMonitorID - the id of the location monitor that did the poll
serviceId - the id of the service that was polled

getServiceMonitorLocators

public Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
Description copied from interface: PollerBackEnd
Get service monitor locators for creating serviceMonitors for the poller.

Specified by:
getServiceMonitorLocators in interface PollerBackEnd

getMonitorName

public String getMonitorName(int locationMonitorId)
Description copied from interface: PollerBackEnd
Get monitor name

Specified by:
getMonitorName in interface PollerBackEnd


Copyright © 2009. All Rights Reserved.