/** * Closes {@link Snmp} created when instance of this class was created. */ @Override public void close() throws TimeoutException, IOException { if (logger.isDebugEnabled()) { logger.debug("Closing SNMP connection"); } this.snmp.close(); }
/** * Will close current SNMP mapping. */ @OnStopped public void close() { try { if (this.targetResource != null) { this.targetResource.close(); } } catch (Exception e) { this.getLogger().warn("Failure while closing target resource " + this.targetResource, e); } this.targetResource = null; try { if (this.transportMapping != null) { this.transportMapping.close(); } } catch (IOException e) { this.getLogger().warn("Failure while closing UDP transport mapping", e); } this.transportMapping = null; try { if (this.snmp != null) { this.snmp.close(); } } catch (IOException e) { this.getLogger().warn("Failure while closing UDP transport mapping", e); } this.snmp = null; }
try { if ( snmp != null ) { snmp.close();
public void stop () throws IOException { if ( this.snmp != null ) { this.snmp.close (); this.snmp = null; } }
protected void close() throws IOException { if (m_session != null) { m_session.close(); m_session = null; } } }
@Override public final void stop() { try { snmp.close(); } catch (IOException e) { } }
/** * Performs service shutdown by stopping SnmpTrapSession **/ protected void stopService() throws Exception { snmp.close(); }
public void close() throws IOException { snmp4J.close(); } }
/** * Performs service shutdown by stopping SnmpTrapSession **/ protected void stopService() throws Exception { snmp.close(); }
@Override protected void finalize() throws Throwable { context.close(); super.finalize(); } }
public void close() { try { snmp.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
/** * Closes {@link Snmp} created when instance of this class was created. */ @Override public void close() throws TimeoutException, IOException { if (logger.isDebugEnabled()) { logger.debug("Closing SNMP connection"); } this.snmp.close(); }
/** * */ public void stop() throws IOException { m_snmp.close(); }
private static void closeQuietly(Snmp session) { if (session == null) { return; } try { session.close(); } catch (IOException e) { LOG.error("error closing SNMP connection", e); } finally { Snmp4JStrategy.reapSession(session); } }
private static void closeQuietly(Snmp session) { if (session == null) { return; } try { session.close(); } catch (IOException e) { LOG.error("error closing SNMP connection", e); } finally { Snmp4JStrategy.reapSession(session); } }
public void stop() throws Exception { snmp.close(); threadPool.cancel(); }
@Override public void unregisterForTraps(final TrapNotificationListener listener, InetAddress address, int snmpTrapPort) throws IOException { final RegistrationInfo info = s_registrations.remove(listener); final Snmp session = info.getSession(); try { session.close(); } catch (final IOException e) { LOG.error("session error unregistering for traps", e); throw e; } finally { Snmp4JStrategy.reapSession(session); } }
@Override public void unregisterForTraps(final TrapNotificationListener listener, final int snmpTrapPort) throws IOException { final RegistrationInfo info = s_registrations.remove(listener); final Snmp session = info.getSession(); try { session.close(); } catch (final IOException e) { LOG.error("session error unregistering for traps", e); throw e; } finally { Snmp4JStrategy.reapSession(session); } }
@Override public void close() { try { snmp.close(); } catch (IOException e1) { logger.error("Failure on snmp close: {}", e1); logger.catching(e1); } super.close(); }
private void closeQuietly(Snmp session) { if (session == null) { return; } try { session.close(); } catch (IOException e) { ThreadCategory.getInstance(Snmp4JStrategy.class).error("error closing SNMP connection: " + e, e); } } }