com.sun.jmx.snmp.daemon.SnmpAdaptorServer Java Examples
The following examples show how to use
com.sun.jmx.snmp.daemon.SnmpAdaptorServer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #2
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #3
Source File: SnmpSubNextRequestHandler.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #4
Source File: SnmpSubNextRequestHandler.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #5
Source File: SnmpSubNextRequestHandler.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #6
Source File: SnmpSubNextRequestHandler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #7
Source File: SnmpSubNextRequestHandler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #8
Source File: SnmpSubNextRequestHandler.java From JDKSourceCode1.8 with MIT License | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #9
Source File: SnmpSubNextRequestHandler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #10
Source File: SnmpSubNextRequestHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #11
Source File: SnmpSubNextRequestHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #12
Source File: SnmpSubNextRequestHandler.java From hottub with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #13
Source File: SnmpSubNextRequestHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #14
Source File: SnmpSubNextRequestHandler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private void init(SnmpPdu req, SnmpAdaptorServer server) { this.server = server; // The translation table is easy in this case ... // final int max= translation.length; final SnmpVarBind[] list= req.varBindList; final NonSyncVector<SnmpVarBind> nonSyncVarBind = ((NonSyncVector<SnmpVarBind>)varBind); for(int i=0; i < max; i++) { translation[i]= i; // we need to allocate a new SnmpVarBind. Otherwise the first // sub request will modify the list... // final SnmpVarBind newVarBind = new SnmpVarBind(list[i].oid, list[i].value); nonSyncVarBind.addNonSyncElement(newVarBind); } }
Example #15
Source File: SnmpSubNextRequestHandler.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #16
Source File: JVM_MANAGEMENT_MIB_IMPL.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) { final Iterator<NotificationTarget> iterator = notificationTargets.iterator(); final SnmpAdaptorServer adaptor = (SnmpAdaptorServer) getSnmpAdaptor(); if (adaptor == null) { log.error("sendTrap", "Cannot send trap: adaptor is null."); return; } if (!adaptor.isActive()) { log.config("sendTrap", "Adaptor is not active: trap not sent."); return; } while(iterator.hasNext()) { NotificationTarget target = null; try { target = iterator.next(); SnmpPeer peer = new SnmpPeer(target.getAddress(), target.getPort()); SnmpParameters p = new SnmpParameters(); p.setRdCommunity(target.getCommunity()); peer.setParams(p); log.debug("handleNotification", "Sending trap to " + target.getAddress() + ":" + target.getPort()); adaptor.snmpV2Trap(peer, trap, list, null); }catch(Exception e) { log.error("sendTrap", "Exception occurred while sending trap to [" + target + "]. Exception : " + e); log.debug("sendTrap",e); } } }
Example #17
Source File: SnmpSubNextRequestHandler.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #18
Source File: SnmpSubNextRequestHandler.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
protected SnmpSubNextRequestHandler(SnmpEngine engine, SnmpAdaptorServer server, SnmpIncomingRequest incRequest, SnmpMibAgent agent, SnmpPdu req) { super(engine, incRequest, agent, req); init(req, server); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(), "SnmpSubNextRequestHandler", "Constructor : " + this); } }
Example #19
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #20
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected SnmpSubNextRequestHandler(SnmpEngine engine, SnmpAdaptorServer server, SnmpIncomingRequest incRequest, SnmpMibAgent agent, SnmpPdu req) { super(engine, incRequest, agent, req); init(req, server); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(), "SnmpSubNextRequestHandler", "Constructor : " + this); } }
Example #21
Source File: SnmpSubNextRequestHandler.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #22
Source File: SnmpSubNextRequestHandler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #23
Source File: JVM_MANAGEMENT_MIB_IMPL.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) { final Iterator<NotificationTarget> iterator = notificationTargets.iterator(); final SnmpAdaptorServer adaptor = (SnmpAdaptorServer) getSnmpAdaptor(); if (adaptor == null) { log.error("sendTrap", "Cannot send trap: adaptor is null."); return; } if (!adaptor.isActive()) { log.config("sendTrap", "Adaptor is not active: trap not sent."); return; } while(iterator.hasNext()) { NotificationTarget target = null; try { target = iterator.next(); SnmpPeer peer = new SnmpPeer(target.getAddress(), target.getPort()); SnmpParameters p = new SnmpParameters(); p.setRdCommunity(target.getCommunity()); peer.setParams(p); log.debug("handleNotification", "Sending trap to " + target.getAddress() + ":" + target.getPort()); adaptor.snmpV2Trap(peer, trap, list, null); }catch(Exception e) { log.error("sendTrap", "Exception occurred while sending trap to [" + target + "]. Exception : " + e); log.debug("sendTrap",e); } } }
Example #24
Source File: SnmpSubNextRequestHandler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
protected SnmpSubNextRequestHandler(SnmpEngine engine, SnmpAdaptorServer server, SnmpIncomingRequest incRequest, SnmpMibAgent agent, SnmpPdu req) { super(engine, incRequest, agent, req); init(req, server); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(), "SnmpSubNextRequestHandler", "Constructor : " + this); } }
Example #25
Source File: SnmpSubNextRequestHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
protected SnmpSubNextRequestHandler(SnmpEngine engine, SnmpAdaptorServer server, SnmpIncomingRequest incRequest, SnmpMibAgent agent, SnmpPdu req) { super(engine, incRequest, agent, req); init(req, server); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(), "SnmpSubNextRequestHandler", "Constructor : " + this); } }
Example #26
Source File: SnmpSubNextRequestHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #27
Source File: JVM_MANAGEMENT_MIB_IMPL.java From hottub with GNU General Public License v2.0 | 5 votes |
private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) { final Iterator<NotificationTarget> iterator = notificationTargets.iterator(); final SnmpAdaptorServer adaptor = (SnmpAdaptorServer) getSnmpAdaptor(); if (adaptor == null) { log.error("sendTrap", "Cannot send trap: adaptor is null."); return; } if (!adaptor.isActive()) { log.config("sendTrap", "Adaptor is not active: trap not sent."); return; } while(iterator.hasNext()) { NotificationTarget target = null; try { target = iterator.next(); SnmpPeer peer = new SnmpPeer(target.getAddress(), target.getPort()); SnmpParameters p = new SnmpParameters(); p.setRdCommunity(target.getCommunity()); peer.setParams(p); log.debug("handleNotification", "Sending trap to " + target.getAddress() + ":" + target.getPort()); adaptor.snmpV2Trap(peer, trap, list, null); }catch(Exception e) { log.error("sendTrap", "Exception occurred while sending trap to [" + target + "]. Exception : " + e); log.debug("sendTrap",e); } } }
Example #28
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * The constructor initialize the subrequest with the whole varbind * list contained in the original request. */ protected SnmpSubNextRequestHandler(SnmpAdaptorServer server, SnmpMibAgent agent, SnmpPdu req) { super(agent,req); init(req, server); }
Example #29
Source File: SnmpSubNextRequestHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
protected SnmpSubNextRequestHandler(SnmpEngine engine, SnmpAdaptorServer server, SnmpIncomingRequest incRequest, SnmpMibAgent agent, SnmpPdu req) { super(engine, incRequest, agent, req); init(req, server); if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubNextRequestHandler.class.getName(), "SnmpSubNextRequestHandler", "Constructor : " + this); } }
Example #30
Source File: JVM_MANAGEMENT_MIB_IMPL.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) { final Iterator<NotificationTarget> iterator = notificationTargets.iterator(); final SnmpAdaptorServer adaptor = (SnmpAdaptorServer) getSnmpAdaptor(); if (adaptor == null) { log.error("sendTrap", "Cannot send trap: adaptor is null."); return; } if (!adaptor.isActive()) { log.config("sendTrap", "Adaptor is not active: trap not sent."); return; } while(iterator.hasNext()) { NotificationTarget target = null; try { target = iterator.next(); SnmpPeer peer = new SnmpPeer(target.getAddress(), target.getPort()); SnmpParameters p = new SnmpParameters(); p.setRdCommunity(target.getCommunity()); peer.setParams(p); log.debug("handleNotification", "Sending trap to " + target.getAddress() + ":" + target.getPort()); adaptor.snmpV2Trap(peer, trap, list, null); }catch(Exception e) { log.error("sendTrap", "Exception occurred while sending trap to [" + target + "]. Exception : " + e); log.debug("sendTrap",e); } } }