@Override public void addNotifications(List<Mapping> notifications) { trapEmitter.addNotifications(notifications); }
@Override public void removeNotifications(List<Mapping> notifications) { trapEmitter.removeNotifications(notifications); }
fixManagerVersion(m); Target target = createTarget(m); if (target == null){ log.warn("createTarget: manager m: "+m.toString() + " is null!"); new ArrayList(notifications.size()); addNotifications(notifications); } catch (Exception e) { log.error("Accessing resource '" + snmpAgentService.getNotificationMapResName() + "'");
this.trapEmitter = new TrapEmitter(this); this.trapEmitter.start();
int index = findMappingIndex(n); if(index < 0) { log.debug("No SNMP notifications configured for Notification " + n.getType() + " doing nothing"); sendTrap(v1TrapPdu, t, m.getSecurityName()); break; v2cTrapPdu = this.trapFactory.generateV2cTrap(n, m, wrapper); sendTrap(v2cTrapPdu, t, m.getSecurityName()); break; sendTrap(v3TrapPdu, t, m.getSecurityName());
@Override public void sendJMXNotification(Notification notification) { if(notification.getSequenceNumber() <= 0) { notification.setSequenceNumber(getNextNotificationSequenceNumber()); } try { this.trapEmitter.send(notification); } catch (Exception e) { log.error("Problem occured while Sending trap", e); } }
/** * Complete emitter initialisation **/ public void start() throws Exception { // Load persisted manager subscriptions load(); // Instantiate the trap factory this.trapFactory = (TrapFactory) Class.forName(this.snmpAgentService.getTrapFactoryClassName(), true, this.getClass().getClassLoader()).newInstance(); // Initialise this.trapFactory.set(this.snmpAgentService.getClock(), this.snmpAgentService.getTrapCounter(), this.snmpAgentService.getRequestHandler()); // Start the trap factory this.trapFactory.start(); }
user.getPrivacyProtocolID(), new OctetString(user.getPrivacyPassphrase())); Snmp snmp = createSnmpSession(target.getAddress()); byte[] authorativeEngine = snmp.discoverAuthoritativeEngineID(target.getAddress(), 8000); if(authorativeEngine != null) {
fixManagerVersion(m); Target target = createTarget(m); if (target == null){ log.warn("createTarget: manager m: "+m.toString() + " is null!"); new ArrayList(notifications.size()); addNotifications(notifications); } catch (Exception e) { log.error("Accessing resource '" + snmpAgentService.getNotificationMapResName() + "'");
this.trapEmitter = new TrapEmitter(this); this.trapEmitter.start();
int index = findMappingIndex(n); if(index < 0) { log.debug("No SNMP notifications configured for Notification " + n.getType() + " doing nothing"); sendTrap(v1TrapPdu, t, m.getSecurityName()); break; v2cTrapPdu = this.trapFactory.generateV2cTrap(n, m, wrapper); sendTrap(v2cTrapPdu, t, m.getSecurityName()); break; sendTrap(v3TrapPdu, t, m.getSecurityName());
@Override public void sendJMXNotification(Notification notification) { if(notification.getSequenceNumber() <= 0) { notification.setSequenceNumber(getNextNotificationSequenceNumber()); } try { this.trapEmitter.send(notification); } catch (Exception e) { log.error("Problem occured while Sending trap", e); } }
/** * Complete emitter initialisation **/ public void start() throws Exception { // Load persisted manager subscriptions load(); // Instantiate the trap factory this.trapFactory = (TrapFactory) Class.forName(this.snmpAgentService.getTrapFactoryClassName(), true, this.getClass().getClassLoader()).newInstance(); // Initialise this.trapFactory.set(this.snmpAgentService.getClock(), this.snmpAgentService.getTrapCounter(), this.snmpAgentService.getRequestHandler()); // Start the trap factory this.trapFactory.start(); }
user.getPrivacyProtocolID(), new OctetString(user.getPrivacyPassphrase())); Snmp snmp = createSnmpSession(target.getAddress()); byte[] authorativeEngine = snmp.discoverAuthoritativeEngineID(target.getAddress(), 8000); if(authorativeEngine != null) {
/** * All notifications are intercepted here and are routed for emission. */ public void handleNotification2(Notification n, Object handback) { if (log.isDebugEnabled()) { log.debug("Received notification: <" + n + "> Payload " + "TS: <" + n.getTimeStamp() + "> " + "SN: <" + n.getSequenceNumber() + "> " + "T: <" + n.getType() + ">"); } try { this.trapEmitter.send(n); } catch (Exception e) { log.error("Sending trap", e); } }
@Override public void addNotifications(List<Mapping> notifications) { trapEmitter.addNotifications(notifications); }
@Override public void removeNotifications(List<Mapping> notifications) { trapEmitter.removeNotifications(notifications); }
/** * All notifications are intercepted here and are routed for emission. */ public void handleNotification2(Notification n, Object handback) { if (log.isDebugEnabled()) { log.debug("Received notification: <" + n + "> Payload " + "TS: <" + n.getTimeStamp() + "> " + "SN: <" + n.getSequenceNumber() + "> " + "T: <" + n.getType() + ">"); } try { this.trapEmitter.send(n); } catch (Exception e) { log.error("Sending trap", e); } }