/** * 关闭资源connector * * @author 唐延波 * @date 2015-6-24 */ @Override public void shutdown(){ connector.dispose(); }
/** * 关闭资源connector * * @author 唐延波 * @date 2015-6-24 */ @Override public void shutdown(){ connector.dispose(); }
@Override public void dispose() { if (connector != null) { connector.dispose(); } }
/** * 关闭资源connector * * @author 唐延波 * @date 2015-6-24 */ @Override public void shutdown(){ connector.dispose(); }
synchronized void stop() { if (reconnectFuture != null) { reconnectFuture.cancel(true); reconnectFuture = null; } // QFJ-849: clean up resources of MINA connector reconnectTask.ioConnector.dispose(); } }
@Override public void dispose() { IoConnector connector = this.connectorReference.getAndSet(null); if (connector != null) { connector.dispose(); } // FIXME is this necessary if (bridgeConnector != null) { bridgeConnector.dispose(); } }
/** * {@inheritDoc} */ public void close() { closed = true; if(!closed) { LOG.info("XMPP server connector to {} closing", otherServer); sessionContext.close(); connector.dispose(); pingTimer.cancel(); LOG.info("XMPP server connector to {} closed", otherServer); } }
/** * Disconnect from the remote LDAP server * * @return <code>true</code> if the connection is closed, false otherwise * @throws IOException if some I/O error occurs */ public boolean close() throws IOException { // Close the session if ( ( ldapSession != null ) && connected.get() ) { ldapSession.close( true ); connected.set( false ); } // And close the connector if it has been created locally if ( localConnector ) { // Release the connector connector.dispose(); connector = null; } // Reset the messageId messageId.set( 0 ); return true; }
/** * {@inheritDoc} */ @Override public void close() throws IOException { // Close the session if ( ( ldapSession != null ) && connected.get() ) { ldapSession.closeNow(); connected.set( false ); } // And close the connector if it has been created locally // Release the connector connectorMutex.lock(); try { if ( connector != null ) { connector.dispose(); connector = null; } } finally { connectorMutex.unlock(); } // Reset the messageId messageId.set( 0 ); }
/** * {@inheritDoc} */ @Override public void close() throws IOException { // Close the session if ( ( ldapSession != null ) && connected.get() ) { ldapSession.closeNow(); connected.set( false ); } // And close the connector if it has been created locally // Release the connector connectorMutex.lock(); try { if ( connector != null ) { connector.dispose(); connector = null; } } finally { connectorMutex.unlock(); } // Reset the messageId messageId.set( 0 ); }
/** * {@inheritDoc} */ @Override public void close() throws IOException { // Close the session if ( ( ldapSession != null ) && connected.get() ) { ldapSession.closeNow(); connected.set( false ); } // And close the connector if it has been created locally // Release the connector connectorMutex.lock(); try { if ( connector != null ) { connector.dispose(); connector = null; } } finally { connectorMutex.unlock(); } // Reset the messageId messageId.set( 0 ); }
/** * Stop communicating with the IT-100 and release the port. * @throws Exception If there is an error while trying to close the port. */ public void disconnect() throws Exception { if (session != null) { session.getCloseFuture().awaitUninterruptibly(); } if (connector != null) { connector.dispose(); } }
@Override public void run() { session.close(false).awaitUninterruptibly(); connector.dispose(); resultReceiver.clear(); } });
connector.dispose(); connector = null;
connector.dispose(); connector = null;
connector.dispose(); connector = null;
connector.dispose(); connector = null;
private void setupIoConnector() throws ConfigError, GeneralSecurityException { final CompositeIoFilterChainBuilder ioFilterChainBuilder = new CompositeIoFilterChainBuilder(userIoFilterChainBuilder); boolean hasProxy = proxyType != null && proxyPort > 0 && socketAddresses[nextSocketAddressIndex] instanceof InetSocketAddress; SSLFilter sslFilter = null; if (sslEnabled) { sslFilter = installSslFilter(ioFilterChainBuilder, !hasProxy); } ioFilterChainBuilder.addLast(FIXProtocolCodecFactory.FILTER_NAME, new ProtocolCodecFilter(new FIXProtocolCodecFactory())); IoConnector newConnector; newConnector = ProtocolFactory.createIoConnector(socketAddresses[nextSocketAddressIndex]); newConnector.setHandler(new InitiatorIoHandler(fixSession, networkingOptions, eventHandlingStrategy)); newConnector.setFilterChainBuilder(ioFilterChainBuilder); if (hasProxy) { ProxyConnector proxyConnector = ProtocolFactory.createIoProxyConnector( (SocketConnector) newConnector, (InetSocketAddress) socketAddresses[nextSocketAddressIndex], new InetSocketAddress(proxyHost, proxyPort), proxyType, proxyVersion, proxyUser, proxyPassword, proxyDomain, proxyWorkstation ); proxyConnector.setHandler(new InitiatorProxyIoHandler( new InitiatorIoHandler(fixSession, networkingOptions, eventHandlingStrategy), sslFilter )); newConnector = proxyConnector; } if (ioConnector != null) { ioConnector.dispose(); } ioConnector = newConnector; }
session.getCloseFuture().awaitUninterruptibly(); connector.dispose(true);