use of org.opennms.netmgt.poller.remote.PollerConfiguration in project opennms by OpenNMS.
the class DefaultPollerFrontEnd method retrieveLatestConfiguration.
private PollerConfiguration retrieveLatestConfiguration() {
PollerConfiguration config = m_backEnd.getPollerConfiguration(getMonitoringSystemId());
m_timeAdjustment.setMasterTime(config.getServerTime());
return config;
}
use of org.opennms.netmgt.poller.remote.PollerConfiguration in project opennms by OpenNMS.
the class DefaultPollerBackEnd method getApplicationsForLocation.
@Transactional(readOnly = true)
@Override
public Set<String> getApplicationsForLocation(final String location) {
final Set<String> retval = new HashSet<>();
PollerConfiguration config = getPollerConfigurationForLocation(location);
for (PolledService service : config.getPolledServices()) {
retval.addAll(service.getApplications());
}
return Collections.unmodifiableSet(retval);
}
use of org.opennms.netmgt.poller.remote.PollerConfiguration in project opennms by OpenNMS.
the class ScanReportPollerFrontEnd method retrieveLatestConfiguration.
private PollerConfiguration retrieveLatestConfiguration() {
PollerConfiguration config = m_backEnd.getPollerConfigurationForLocation(m_location);
m_timeAdjustment.setMasterTime(config.getServerTime());
return config;
}
use of org.opennms.netmgt.poller.remote.PollerConfiguration in project opennms by OpenNMS.
the class ServerUnreachableAdaptor method getPollerConfigurationForLocation.
/** {@inheritDoc} */
@Override
public PollerConfiguration getPollerConfigurationForLocation(final String location) {
if (m_serverUnresponsive) {
return new EmptyPollerConfiguration();
}
try {
final PollerConfiguration config = m_remoteBackEnd.getPollerConfigurationForLocation(location);
m_serverUnresponsive = false;
return config;
} catch (final RemoteAccessException e) {
m_serverUnresponsive = true;
LOG.warn("Server is unable to respond due to the following exception.", e);
return new EmptyPollerConfiguration();
}
}
use of org.opennms.netmgt.poller.remote.PollerConfiguration in project opennms by OpenNMS.
the class ServerUnreachableAdaptor method getPollerConfiguration.
/** {@inheritDoc} */
@Override
public PollerConfiguration getPollerConfiguration(final String locationMonitorId) {
if (m_serverUnresponsive) {
return new EmptyPollerConfiguration();
}
try {
final PollerConfiguration config = m_remoteBackEnd.getPollerConfiguration(locationMonitorId);
m_serverUnresponsive = false;
return config;
} catch (final RemoteAccessException e) {
m_serverUnresponsive = true;
LOG.warn("Server is unable to respond due to the following exception.", e);
return new EmptyPollerConfiguration();
}
}
Aggregations