本文整理了Java中org.opennms.netmgt.events.api.annotations.EventHandler.<init>()
方法的一些代码示例,展示了EventHandler.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EventHandler.<init>()
方法的具体详情如下:
包路径:org.opennms.netmgt.events.api.annotations.EventHandler
类名称:EventHandler
方法名:<init>
暂无
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleServiceDeleted</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.SERVICE_DELETED_EVENT_UEI)
public void handleServiceDeleted(final Event event) {
m_pollerBackEnd.configurationUpdated();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleServiceUnmanaged</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.SERVICE_UNMANAGED_EVENT_UEI)
public void handleServiceUnmanaged(final Event event) {
m_pollerBackEnd.configurationUpdated();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleNodeDeleted</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.NODE_DELETED_EVENT_UEI)
public void handleNodeDeleted(final Event event) {
m_pollerBackEnd.configurationUpdated();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleDiscoveryPause</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.DISC_PAUSE_EVENT_UEI)
public void handleDiscoveryPause(Event event) {
pause();
}
代码示例来源:origin: org.opennms.features.poller/org.opennms.features.poller.remote
/**
* <p>handleNodeDeleted</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.NODE_DELETED_EVENT_UEI)
public void handleNodeDeleted(final Event event) {
m_pollerBackEnd.configurationUpdated();
}
代码示例来源:origin: org.opennms.features/org.opennms.features.discovery
/**
* <p>handleDiscoveryResume</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.DISC_RESUME_EVENT_UEI)
public void handleDiscoveryResume(Event event) {
resume();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleNodeConfigChanged</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.NODE_CONFIG_CHANGE_UEI)
public void handleNodeConfigChanged(final Event event) {
m_pollerBackEnd.configurationUpdated();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleDiscoveryConfigurationChanged</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.DISCOVERYCONFIG_CHANGED_EVENT_UEI)
public void handleDiscoveryConfigurationChanged(Event event) {
LOG.info("handleDiscoveryConfigurationChanged: handling message that a change to configuration happened...");
reloadAndReStart();
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleForceRescan</p>
*
* @param e a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei = EventConstants.FORCE_RESCAN_EVENT_UEI)
public void handleForceRescan(Event e) {
m_linkd.rescheduleNodeCollection(new Long(e.getNodeid()).intValue());
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>handleDaemonConfigChanged</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei=EventConstants.RELOAD_DAEMON_CONFIG_UEI)
public void handleDaemonConfigChanged(final Event event) {
String daemon = EventUtils.getParm(event, EventConstants.PARM_DAEMON_NAME);
if ("PollerBackEnd".equalsIgnoreCase(daemon)) {
m_pollerBackEnd.configurationUpdated();
}
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>rescanCompletedHaldler</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei = EventConstants.RESCAN_COMPLETED_EVENT_UEI)
public void rescanCompletedHaldler(Event event){
getNetwork().refresh(Long.valueOf(event.getNodeid()).intValue());
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>nodeUpHandler</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei = EventConstants.NODE_UP_EVENT_UEI)
public void nodeUpHandler(Event event) {
getNetwork().activate(Long.valueOf(event.getNodeid()).intValue());
}
代码示例来源:origin: OpenNMS/opennms
@EventHandler(uei = EventConstants.RELOAD_DAEMON_CONFIG_UEI)
public void handleReloadEvent(Event e) {
DaemonTools.handleReloadEvent(e, Syslogd.LOG4J_CATEGORY, (event) -> handleConfigurationChanged());
}
}
代码示例来源:origin: OpenNMS/opennms
@EventHandler(uei = EventConstants.RELOAD_DAEMON_CONFIG_UEI)
public void handleReloadEvent(Event e) {
DaemonTools.handleReloadEvent(e, WsManAssetProvisioningAdapter.NAME, (event) -> handleConfigurationChanged());
}
代码示例来源:origin: OpenNMS/opennms
/**
* Handle a Node Deleted Event
*
* @param event
*/
@EventHandler(uei=EventConstants.NODE_DELETED_EVENT_UEI)
public void handleNodeDeleted(Event event) throws InsufficientInformationException {
EventUtils.checkNodeId(event);
m_linkd.deleteNode(event.getNodeid().intValue());
}
代码示例来源:origin: OpenNMS/opennms
@EventHandler(uei=EventConstants.MONITORING_SYSTEM_ADDED_UEI)
public void onMonitoringSystemAdded(final Event e) {
runInLoggingTransaction(() -> {
final String id = e.getParm(EventConstants.PARAM_MONITORING_SYSTEM_ID).toString();
LOG.debug("Monitoring system added: {}", id);
if (id != null) {
m_state.put(id, AggregateMinionStatus.up());
}
});
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>interfaceDownHandler</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei = EventConstants.INTERFACE_DOWN_EVENT_UEI)
public void interfaceDownHandler(Event event) {
getNetwork().suspend(event.getInterface());
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>interfaceUpHandler</p>
*
* @param event a {@link org.opennms.netmgt.xml.event.Event} object.
*/
@EventHandler(uei = EventConstants.INTERFACE_UP_EVENT_UEI)
public void interfaceUpHandler(Event event) {
getNetwork().activate(event.getInterface());
}
代码示例来源:origin: OpenNMS/opennms
/**
* Handle a Node Gained Service Event if service is SNMP
*
* @param event
*/
@EventHandler(uei=EventConstants.NODE_GAINED_SERVICE_EVENT_UEI)
public void handleNodeGainedService(Event event) throws InsufficientInformationException {
EventUtils.checkNodeId(event);
EventUtils.checkService(event);
if (event.getService().equals("SNMP"))
m_linkd.scheduleNodeCollection(event.getNodeid().intValue());
}
代码示例来源:origin: OpenNMS/opennms
@EventHandler(uei=EventConstants.NODE_LOST_SERVICE_EVENT_UEI)
public void handleAnEvent(Event e) throws Throwable {
System.err.println("Received Event "+e.getUei());
handlerCallCount++;
if (thrownException != null) {
throw thrownException;
}
}
内容来源于网络,如有侵权,请联系作者删除!