@Test(expected = ConnectionCanceledException.class) public void testShutdown() throws Exception { final DefaultSessionPool pool = new DefaultSessionPool(new TestLoginConnectionService(), new DisabledX509TrustManager(), new DefaultX509KeyManager(), new DefaultVaultRegistry(new DisabledPasswordCallback()), PathCache.empty(), new DisabledTranscriptListener(), new Host(new TestProtocol())); pool.shutdown(); pool.borrow(BackgroundActionState.running); }
@Override public void shutdown() { try { if(log.isInfoEnabled()) { log.info(String.format("Close connection pool %s", this)); } this.evict(); pool.close(); } catch(Exception e) { log.warn(String.format("Failure closing connection pool %s", e.getMessage())); } finally { registry.clear(); } }
DefaultSessionPool implements SessionPool { @Override public void shutdown() { try { if(log.isInfoEnabled()) { log.info(String.format("Close connection pool %s", this)); } this.evict(); pool.close(); } catch(Exception e) { log.warn(String.format("Failure closing connection pool %s", e.getMessage())); } finally { registry.clear(); } } }
DefaultSessionPool implements SessionPool { @Override public void shutdown() { try { if(log.isInfoEnabled()) { log.info(String.format("Close connection pool %s", this)); } this.evict(); pool.close(); } catch(Exception e) { log.warn(String.format("Failure closing connection pool %s", e.getMessage())); } finally { registry.clear(); } } DefaultSessionPool(final ConnectionService connect, final X509TrustManager trust, final X509KeyManager key,
                              final VaultRegistry registry, final Cache<Path> cache, final TranscriptListener transcript,
                              final Host bookmark);  DefaultSessionPool(final ConnectionService connect, final VaultRegistry registry, final Cache<Path> cache,
                              final TranscriptListener transcript, final Host bookmark, final GenericObjectPool<Session> pool); }
DefaultSessionPool implements SessionPool { @Override public void shutdown() { try { if(log.isInfoEnabled()) { log.info(String.format("Close connection pool %s", this)); } this.evict(); pool.close(); } catch(Exception e) { log.warn(String.format("Failure closing connection pool %s", e.getMessage())); } finally { registry.clear(); } } DefaultSessionPool(final ConnectionService connect, final X509TrustManager trust, final X509KeyManager key,
                              final VaultRegistry registry, final Cache<Path> cache, final TranscriptListener transcript,
                              final Host bookmark);  DefaultSessionPool(final ConnectionService connect, final VaultRegistry registry, final Cache<Path> cache,
                              final TranscriptListener transcript, final Host bookmark, final GenericObjectPool<Session> pool); DefaultSessionPool withMinIdle(final int count); DefaultSessionPool withMaxIdle(final int count); DefaultSessionPool withMaxTotal(final int count); @Override Session<?> borrow(final BackgroundActionState callback); @Override void release(final Session<?> session, final BackgroundException failure); @Override void evict(); @Override void shutdown(); @Override Host getHost(); @Override Cache<Path> getCache(); @Override VaultRegistry getVault(); int getNumActive(); int getNumIdle(); @Override Session.State getState(); @Override T getFeature(final Class<T> type); @Override String toString(); }
DefaultSessionPool implements SessionPool { @Override public void shutdown() { try { if(log.isInfoEnabled()) { log.info(String.format("Close connection pool %s", this)); } this.evict(); pool.close(); } catch(Exception e) { log.warn(String.format("Failure closing connection pool %s", e.getMessage())); } finally { registry.clear(); } } DefaultSessionPool(final ConnectionService connect, final X509TrustManager trust, final X509KeyManager key,
                              final VaultRegistry registry, final Cache<Path> cache, final TranscriptListener transcript,
                              final Host bookmark);  DefaultSessionPool(final ConnectionService connect, final VaultRegistry registry, final Cache<Path> cache,
                              final TranscriptListener transcript, final Host bookmark, final GenericObjectPool<Session> pool); DefaultSessionPool withMinIdle(final int count); DefaultSessionPool withMaxIdle(final int count); DefaultSessionPool withMaxTotal(final int count); @Override Session<?> borrow(final BackgroundActionState callback); @Override void release(final Session<?> session, final BackgroundException failure); @Override void evict(); @Override void shutdown(); @Override Host getHost(); @Override Cache<Path> getCache(); @Override VaultRegistry getVault(); int getNumActive(); int getNumIdle(); @Override Session.State getState(); @Override T getFeature(final Class<T> type); @Override String toString();  }