public void connectionCreated(final Connection connection) { // create the manager for this connection InBandBytestreamManager.getByteStreamManager(connection); // register shutdown listener connection.addConnectionListener(new AbstractConnectionListener() { @Override public void connectionClosed() { InBandBytestreamManager.getByteStreamManager(connection).disableService(); } @Override public void connectionClosedOnError(Exception e) { InBandBytestreamManager.getByteStreamManager(connection).disableService(); } @Override public void reconnectionSuccessful() { // re-create the manager for this connection InBandBytestreamManager.getByteStreamManager(connection); } }); }
public void connectionCreated(final Connection connection) { // create the manager for this connection Socks5BytestreamManager.getBytestreamManager(connection); // register shutdown listener connection.addConnectionListener(new AbstractConnectionListener() { @Override public void connectionClosed() { Socks5BytestreamManager.getBytestreamManager(connection).disableService(); } @Override public void connectionClosedOnError(Exception e) { Socks5BytestreamManager.getBytestreamManager(connection).disableService(); } @Override public void reconnectionSuccessful() { // re-create the manager for this connection Socks5BytestreamManager.getBytestreamManager(connection); } }); }
public void connectionCreated(Connection connection) { final InBandBytestreamManager manager; manager = InBandBytestreamManager .getByteStreamManager(connection); // register shutdown listener connection .addConnectionListener(new AbstractConnectionListener() { public void connectionClosed() { manager.disableService(); } }); }
public void connectionCreated(final Connection connection) { final Socks5BytestreamManager manager; manager = Socks5BytestreamManager .getBytestreamManager(connection); // register shutdown listener connection .addConnectionListener(new AbstractConnectionListener() { public void connectionClosed() { manager.disableService(); } public void connectionClosedOnError( Exception e) { manager.disableService(); } public void reconnectionSuccessful() { managers.put(connection, manager); } }); }
public void connectionCreated(final Connection connection) { final Socks5BytestreamManager manager; manager = Socks5BytestreamManager.getBytestreamManager(connection); // register shutdown listener connection.addConnectionListener(new AbstractConnectionListener() { public void connectionClosed() { manager.disableService(); } public void connectionClosedOnError(Exception e) { manager.disableService(); } public void reconnectionSuccessful() { managers.put(connection, manager); } }); }
/** * Creates a new XMPP connection over TCP (optionally using proxies). * <p> * Note that XMPPTCPConnection constructors do not establish a connection to the server * and you must call {@link #connect()}. * </p> * * @param config the connection configuration. */ public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) { super(config); this.config = config; addConnectionListener(new AbstractConnectionListener() { @Override public void connectionClosedOnError(Exception e) { if (e instanceof XMPPException.StreamErrorException) { dropSmState(); } } }); }
public void connectionCreated(Connection connection) { final InBandBytestreamManager manager; manager = InBandBytestreamManager.getByteStreamManager(connection); // register shutdown listener connection.addConnectionListener(new AbstractConnectionListener() { public void connectionClosed() { manager.disableService(); } }); }
public void connectionCreated(Connection connection) { final Socks5BytestreamManager manager; manager = Socks5BytestreamManager.getBytestreamManager(connection); // register shutdown listener connection.addConnectionListener(new AbstractConnectionListener() { public void connectionClosed() { manager.disableService(); } }); }
/** * Creates a new XMPP connection over TCP (optionally using proxies). * <p> * Note that XMPPTCPConnection constructors do not establish a connection to the server * and you must call {@link #connect()}. * </p> * * @param config the connection configuration. */ public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) { super(config); this.config = config; addConnectionListener(new AbstractConnectionListener() { @Override public void connectionClosedOnError(Exception e) { if (e instanceof XMPPException.StreamErrorException || e instanceof StreamManagementException) { dropSmState(); } } }); }