use of org.opennms.netmgt.config.scriptd.StopScript in project opennms by OpenNMS.
the class Executor method stop.
public synchronized void stop() {
// Shut down the event listener
if (m_broadcastEventProcessor != null) {
m_broadcastEventProcessor.close();
}
m_broadcastEventProcessor = null;
// Shut down the thread pool
m_executorService.shutdown();
// Run all stop scripts
for (final StopScript stopScript : m_config.getStopScripts()) {
if (stopScript.getContent().isPresent()) {
try {
m_scriptManager.exec(stopScript.getLanguage(), "", 0, 0, stopScript.getContent().get());
} catch (BSFException e) {
LOG.error("Stop script failed: " + stopScript, e);
}
} else {
LOG.warn("Stop script has no script contents: " + stopScript);
}
}
LOG.debug("Scriptd executor stopped");
}
Aggregations