org.opennms.netmgt.poller.remote
Interface PollerBackEnd

All Known Implementing Classes:
DefaultPollerBackEnd, ServerUnreachableAdaptor

@Transactional
public interface PollerBackEnd

Author:
Mathew Brozowski

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.
 

Method Detail

getMonitoringLocations

@Transactional(readOnly=true)
Collection<OnmsMonitoringLocationDefinition> getMonitoringLocations()
Return the set of available MonitoringLocationDefinitions


registerLocationMonitor

int registerLocationMonitor(String monitoringLocationId)
Register a new location monitor

Parameters:
monitoringLocationId - the id of the monitoredLocation to associate with this location monitor
Returns:
the id of the new locations monitor

getMonitorName

String getMonitorName(int locationMonitorId)
Get monitor name


getServiceMonitorLocators

Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
Get service monitor locators for creating serviceMonitors for the poller.


pollerStarting

boolean pollerStarting(int locationMonitorId,
                       Map<String,String> pollerDetails)
Notifies the backend that a registered poller is starting

Parameters:
locationMonitorId - the id of the requesting location monitor
pollerDetails - TODO

pollerStopping

void pollerStopping(int locationMonitorId)
Notifies the backend that a registered poller is stopping

Parameters:
locationMonitorId - the id of the requesting location monitor

pollerCheckingIn

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.

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.

getPollerConfiguration

@Transactional(readOnly=true)
PollerConfiguration getPollerConfiguration(int locationMonitorId)
Gets the poller configuration assigned to this monitoring location

Parameters:
locationMonitorId - the id of the requesting location monitor
Returns:
the PollerConfiguration for the indicicated location monitor

reportResult

void reportResult(int locationMonitorID,
                  int serviceId,
                  PollStatus status)
Report a poll result from the client to the server.

Parameters:
locationMonitorID - the id of the location monitor that did the poll
serviceId - the id of the service that was polled
pollStatus - the result of the poll

configurationUpdated

void configurationUpdated()

checkForDisconnectedMonitors

void checkForDisconnectedMonitors()


Copyright © 2009. All Rights Reserved.