public synchronized boolean removeNotificationListener(Address listenAddress) { TransportMapping tm = notificationListeners.remove(listenAddress); if (tm == null) { return false; } tm.removeTransportListener(messageDispatcher); notificationTransports.remove(tm); closeTransportMapping(tm); return true; }
/** * Removes the specified transport mapping from this SNMP session. * If the transport mapping is not currently part of this SNMP session, * this method will have no effect. * @param transportMapping * a previously added <code>TransportMapping</code>. */ public void removeTransportMapping(TransportMapping<? extends Address> transportMapping) { messageDispatcher.removeTransportMapping(transportMapping); transportMapping.removeTransportListener(messageDispatcher); }
/** * Removes the specified transport mapping from this SNMP session. * If the transport mapping is not currently part of this SNMP session, * this method will have no effect. * * @param transportMapping * a previously added <code>TransportMapping</code>. */ public void removeTransportMapping(TransportMapping<? extends Address> transportMapping) { messageDispatcher.removeTransportMapping(transportMapping); transportMapping.removeTransportListener(messageDispatcher); }
public synchronized boolean removeNotificationListener(Address listenAddress) { TransportMapping<?> tm = notificationListeners.remove(listenAddress); if (tm == null) { return false; } tm.removeTransportListener(messageDispatcher); notificationTransports.remove(tm); closeTransportMapping(tm); return true; }
/** * Removes the specified transport mapping from this SNMP session. * If the transport mapping is not currently part of this SNMP session, * this method will have no effect. * @param transportMapping * a previously added <code>TransportMapping</code>. */ public void removeTransportMapping(TransportMapping transportMapping) { messageDispatcher.removeTransportMapping(transportMapping); transportMapping.removeTransportListener(messageDispatcher); }
protected void registerTransportMappings() { ArrayList l = new ArrayList(dispatcher.getTransportMappings()); for (Iterator it = l.iterator(); it.hasNext();) { TransportMapping tm = (TransportMapping) it.next(); tm.removeTransportListener(dispatcher); tm.addTransportListener(dispatcher); } }
protected void registerTransportMappings() { ArrayList<TransportMapping> l = new ArrayList<>(dispatcher.getTransportMappings()); for (TransportMapping tm : l) { tm.removeTransportListener(dispatcher); tm.addTransportListener(dispatcher); if (tm instanceof X509TlsTransportMappingConfig) { ((X509TlsTransportMappingConfig) tm).setSecurityCallback(tlsTmMib); } } }
public synchronized boolean removeNotificationListener(Address listenAddress) { TransportMapping tm = (TransportMapping)notificationListeners.remove(listenAddress); if (tm == null) { return false; } tm.removeTransportListener(messageDispatcher); notificationTransports.remove(tm); try { tm.close(); } catch (IOException ex) { logger.error(ex); if (logger.isDebugEnabled()) { ex.printStackTrace(); } } return true; }