protected void linkCounterListener() { agent.removeCounterListener(snmpv2MIB); agent.addCounterListener(snmpv2MIB); usm.getCounterSupport().removeCounterListener(snmpv2MIB); usm.getCounterSupport().addCounterListener(snmpv2MIB); }
/** * Creates a USM MIB implementation connected to the supplied USM. The MIB * contents will reflect any changes to the USM after completion of this * constructor if you register this object as {@link UsmUserListener} to the * USM! * @param usm * a User-based Security Model. * @param securityProtocols * the supported <code>SecurityProtocols</code>. */ public UsmMIB(USM usm, SecurityProtocols securityProtocols) { this.usm = usm; this.securityProtocols = securityProtocols; usm.getCounterSupport().addCounterListener(this); createUsmStats(); createUsmUser(); }
/** * Creates a USM MIB implementation connected to the supplied USM. The MIB * contents will reflect any changes to the USM after completion of this * constructor if you register this object as {@link UsmUserListener} to the * USM! * @param usm * a User-based Security Model. * @param securityProtocols * the supported <code>SecurityProtocols</code>. */ public UsmMIB(USM usm, SecurityProtocols securityProtocols) { this.usm = usm; this.securityProtocols = securityProtocols; usm.getCounterSupport().addCounterListener(this); createUsmStats(); createUsmUser(); }
protected void linkCounterListener() { agent.removeCounterListener(snmpv2MIB); agent.addCounterListener(snmpv2MIB); usm.getCounterSupport().removeCounterListener(snmpv2MIB); usm.getCounterSupport().addCounterListener(snmpv2MIB); agent.removeCounterListener(snmpMpdMib); agent.addCounterListener(snmpMpdMib); MPv3 mpv3 = (MPv3) dispatcher.getMessageProcessingModel(MPv3.ID); if ((mpv3 != null) && (mpv3.getCounterSupport() != null)) { mpv3.getCounterSupport().removeCounterListener(snmpMpdMib); mpv3.getCounterSupport().addCounterListener(snmpMpdMib); } dispatcher.removeCounterListener(snmpMpdMib); dispatcher.addCounterListener(snmpMpdMib); for (TransportMapping tm : dispatcher.getTransportMappings()) { if (tm instanceof TLSTM) { TLSTM tlstm = (TLSTM) tm; tlstm.getCounterSupport().removeCounterListener(tlsTmMib.getCounterListener()); tlstm.getCounterSupport().addCounterListener(tlsTmMib.getCounterListener()); } } }
snmpTargetMIB, snmpNotificationMIB, snmpCommunityMIB); snmpv2MIB.setNotificationOriginator(agent); usm.getCounterSupport().addCounterListener(snmpv2MIB);