use of org.opennms.netmgt.poller.remote.ServicePollState in project opennms by OpenNMS.
the class DefaultPollerFrontEnd method doLoadConfig.
private void doLoadConfig() {
Date oldTime = getCurrentConfigTimestamp();
try {
m_pollService.setServiceMonitorLocators(m_backEnd.getServiceMonitorLocators(DistributionContext.REMOTE_MONITOR));
m_pollerConfiguration = retrieveLatestConfiguration();
synchronized (m_pollState) {
int i = 0;
m_pollState.clear();
// Initialize the monitor for the service
for (final PolledService service : getPolledServices()) {
m_pollState.put(service.getServiceId(), new ServicePollState(service, i++));
}
}
fireConfigurationChange(oldTime, getCurrentConfigTimestamp());
} catch (final Throwable e) {
LOG.warn("Unable to get updated poller configuration.", e);
if (m_pollerConfiguration == null) {
m_pollerConfiguration = new EmptyPollerConfiguration();
}
}
}
use of org.opennms.netmgt.poller.remote.ServicePollState in project opennms by OpenNMS.
the class DefaultPollerFrontEnd method updateServicePollState.
private void updateServicePollState(final Integer polledServiceId, final PollStatus result) {
final ServicePollState pollState = getServicePollState(polledServiceId);
if (pollState == null) {
return;
}
pollState.setLastPoll(result);
fireServicePollStateChanged(pollState.getPolledService(), pollState.getIndex());
}
use of org.opennms.netmgt.poller.remote.ServicePollState in project opennms by OpenNMS.
the class DefaultPollerFrontEnd method setInitialPollTime.
/**
* {@inheritDoc}
*/
@Override
public void setInitialPollTime(final Integer polledServiceId, final Date initialPollTime) {
final ServicePollState pollState = getServicePollState(polledServiceId);
if (pollState == null) {
return;
}
pollState.setInitialPollTime(initialPollTime);
fireServicePollStateChanged(pollState.getPolledService(), pollState.getIndex());
}
Aggregations