@Transactional public class DefaultPollerBackEnd extends Object implements PollerBackEnd, SpringServiceDaemon
DefaultPollerBackEnd class.
| Modifier and Type | Field and Description | 
|---|---|
static String | 
FAILED_POLL_RESULT_MESSAGE_FORMAT  | 
static String | 
FAILURE_SUMMARY_MESSAGE_FORMAT  | 
static int | 
HEARTBEAT_STEP_MULTIPLIER  | 
static String | 
PARM_SCAN_REPORT_FAILURE_MESSAGE  | 
static String | 
PARM_SCAN_REPORT_ID  | 
static String | 
PARM_SCAN_REPORT_LOCATION  | 
CONNECTION_HOST_ADDRESS_KEY, CONNECTION_HOST_NAME_KEY, HOST_ADDRESS_KEY, HOST_NAME_KEY| Constructor and Description | 
|---|
DefaultPollerBackEnd()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
afterPropertiesSet()
afterPropertiesSet 
 | 
void | 
checkForDisconnectedMonitors()
checkForDisconnectedMonitors 
 | 
void | 
configurationUpdated()
configurationUpdated 
 | 
void | 
destroy()
destroy 
 | 
Set<String> | 
getApplicationsForLocation(String location)
Gets all applications associated with  
OnmsMonitoredService
 objects managed by this monitoring location. | 
Set<MetadataField> | 
getMetadataFields()
Gets all of the metadata fields to be used and optionally reported by
 the poller frontend. 
 | 
Collection<OnmsMonitoringLocation> | 
getMonitoringLocations()
getMonitoringLocations 
 | 
String | 
getMonitorName(String locationMonitorId)
Get monitor name 
 | 
protected static Map<String,Object> | 
getParameterMap(Service serviceConfig)  | 
PollerConfiguration | 
getPollerConfiguration(String locationMonitorId)
Deprecated. 
 
Use  
#getPoller(OnmsMonitoringLocation) instead. | 
PollerConfiguration | 
getPollerConfigurationForLocation(String location)
Gets the poller configuration assigned to this monitoring location 
 | 
Collection<ServiceMonitorLocator> | 
getServiceMonitorLocators(DistributionContext context)
Get service monitor locators for creating serviceMonitors for the poller. 
 | 
PollerTheme | 
getTheme()
Gets the theme (color, title, logo) information to use in poller UIs 
 | 
OnmsLocationMonitor.MonitorStatus | 
pollerCheckingIn(String 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(String locationMonitorId,
              Map<String,String> pollerDetails)
Notifies the backend that a registered poller is starting 
 | 
void | 
pollerStopping(String locationMonitorId)
Notifies the backend that a registered poller is stopping 
 | 
String | 
registerLocationMonitor(String monitoringLocationId)
Register a new location monitor 
 | 
void | 
reportResult(String locationMonitorId,
            int serviceId,
            PollStatus pollResult)
Report a poll result from the client to the server. 
 | 
void | 
reportSingleScan(ScanReport report)
Report a single scan from the client to the server. 
 | 
void | 
saveResponseTimeData(String locationMonitorId,
                    OnmsMonitoredService monSvc,
                    double responseTime,
                    Package pkg)
saveResponseTimeData 
 | 
void | 
setDisconnectedTimeout(int disconnectedTimeout)
setDisconnectedTimeout 
 | 
void | 
setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManager 
 | 
void | 
setLocationMonitorDao(LocationMonitorDao locMonDao)
setLocationMonitorDao 
 | 
void | 
setMinimumConfigurationReloadInterval(long value)
setMinimumConfigurationReloadInterval 
 | 
void | 
setMonitoredServiceDao(MonitoredServiceDao monSvcDao)
setMonitoredServiceDao 
 | 
void | 
setMonitoringLocationDao(MonitoringLocationDao monitoringLocationDao)  | 
void | 
setPersisterFactory(PersisterFactory persisterFactory)  | 
void | 
setPollerConfig(PollerConfig pollerConfig)
setPollerConfig 
 | 
void | 
setScanReportDao(ScanReportDao scanReportDao)  | 
void | 
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper 
 | 
void | 
start()
start 
 | 
protected void | 
updateConnectionHostDetails(OnmsLocationMonitor mon,
                           Map<String,String> pollerDetails)  | 
public static final int HEARTBEAT_STEP_MULTIPLIER
public static final String PARM_SCAN_REPORT_ID
public static final String PARM_SCAN_REPORT_LOCATION
public static final String PARM_SCAN_REPORT_FAILURE_MESSAGE
public static final String FAILURE_SUMMARY_MESSAGE_FORMAT
public static final String FAILED_POLL_RESULT_MESSAGE_FORMAT
public void afterPropertiesSet()
afterPropertiesSet
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException - if any.public void start()
start
start in interface SpringServiceDaemonException - if any.public void destroy()
destroy
destroy in interface org.springframework.beans.factory.DisposableBeanpublic void checkForDisconnectedMonitors()
checkForDisconnectedMonitors
checkForDisconnectedMonitors in interface PollerBackEndpublic void configurationUpdated()
configurationUpdated
configurationUpdated in interface PollerBackEnd@Transactional(readOnly=true) public Collection<OnmsMonitoringLocation> getMonitoringLocations()
getMonitoringLocations
getMonitoringLocations in interface PollerBackEndCollection object.@Transactional(readOnly=true) public String getMonitorName(String locationMonitorId)
getMonitorName in interface PollerBackEndlocationMonitorId - a int.String object.@Transactional(readOnly=true) public PollerConfiguration getPollerConfiguration(String locationMonitorId)
#getPoller(OnmsMonitoringLocation) instead.PollerBackEndgetPollerConfiguration in interface PollerBackEndlocationMonitorId - the id of the requesting location monitorhttp://issues.opennms.org/browse/PB-36@Transactional(readOnly=true) public PollerConfiguration getPollerConfigurationForLocation(String location)
PollerBackEndgetPollerConfigurationForLocation in interface PollerBackEndlocation - the location@Transactional(readOnly=true) public Set<String> getApplicationsForLocation(String location)
PollerBackEndOnmsMonitoredService
 objects managed by this monitoring location.getApplicationsForLocation in interface PollerBackEndlocation - the location@Transactional(readOnly=true) public Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
getServiceMonitorLocators in interface PollerBackEndcontext - a DistributionContext object.Collection object.public OnmsLocationMonitor.MonitorStatus pollerCheckingIn(String locationMonitorId, Date currentConfigurationVersion)
pollerCheckingIn in interface PollerBackEndlocationMonitorId - the id of the location monitor that is checking incurrentConfigurationVersion - the version of the configuration that the location monitor is currently usingpublic boolean pollerStarting(String locationMonitorId, Map<String,String> pollerDetails)
pollerStarting in interface PollerBackEndlocationMonitorId - the id of the requesting location monitorpollerDetails - TODOprotected void updateConnectionHostDetails(OnmsLocationMonitor mon, Map<String,String> pollerDetails)
public void pollerStopping(String locationMonitorId)
pollerStopping in interface PollerBackEndlocationMonitorId - the id of the requesting location monitorpublic String registerLocationMonitor(String monitoringLocationId)
registerLocationMonitor in interface PollerBackEndmonitoringLocationId - the id of the monitoredLocation to associate with
 this location monitorpublic void reportResult(String locationMonitorId, int serviceId, PollStatus pollResult)
reportResult in interface PollerBackEndlocationMonitorId - the id of the location monitor that did the pollserviceId - the id of the service that was polledpollResult - a PollStatus object.public void saveResponseTimeData(String locationMonitorId, OnmsMonitoredService monSvc, double responseTime, Package pkg)
saveResponseTimeData
saveResponseTimeData in interface PollerBackEndlocationMonitorId - a String object.monSvc - a OnmsMonitoredService object.responseTime - a double.pkg - a Package object.public void setDisconnectedTimeout(int disconnectedTimeout)
setDisconnectedTimeout
disconnectedTimeout - a int.public void setMinimumConfigurationReloadInterval(long value)
setMinimumConfigurationReloadInterval
value - public void setEventIpcManager(EventIpcManager eventIpcManager)
setEventIpcManager
eventIpcManager - a EventIpcManager object.public void setMonitoringLocationDao(MonitoringLocationDao monitoringLocationDao)
public void setLocationMonitorDao(LocationMonitorDao locMonDao)
setLocationMonitorDao
locMonDao - a LocationMonitorDao object.public void setMonitoredServiceDao(MonitoredServiceDao monSvcDao)
setMonitoredServiceDao
monSvcDao - a MonitoredServiceDao object.public void setScanReportDao(ScanReportDao scanReportDao)
public void setPollerConfig(PollerConfig pollerConfig)
setPollerConfig
pollerConfig - a PollerConfig object.public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
timeKeeper - a TimeKeeper object.public void setPersisterFactory(PersisterFactory persisterFactory)
public void reportSingleScan(ScanReport report)
PollerBackEndreportSingleScan in interface PollerBackEndpublic PollerTheme getTheme()
PollerBackEndgetTheme in interface PollerBackEndpublic Set<MetadataField> getMetadataFields()
PollerBackEndgetMetadataFields in interface PollerBackEndCopyright © 2021. All rights reserved.