Java 类org.jivesoftware.smack.AbstractConnectionListener 实例源码

项目:androidPN-client.    文件:InBandBytestreamManager.java   
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);
        }
    });

}
项目:androidPN-client.    文件:Socks5BytestreamManager.java   
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);
        }
    });
}
项目:xmppsupport_v2    文件:InBandBytestreamManager.java   
public void connectionCreated(Connection connection) {
    final InBandBytestreamManager manager;
    manager = InBandBytestreamManager
            .getByteStreamManager(connection);

    // register shutdown listener
    connection
            .addConnectionListener(new AbstractConnectionListener() {

                public void connectionClosed() {
                    manager.disableService();
                }

            });

}
项目:xmppsupport_v2    文件:Socks5BytestreamManager.java   
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);
                }

            });
}
项目:telegraph    文件:Socks5BytestreamManager.java   
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);
        }

    });
}
项目:Smack    文件:XMPPTCPConnection.java   
/**
 * 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();
            }
        }
    });
}
项目:EIM    文件:InBandBytestreamManager.java   
public void connectionCreated(Connection connection) {
    final InBandBytestreamManager manager;
    manager = InBandBytestreamManager.getByteStreamManager(connection);

    // register shutdown listener
    connection.addConnectionListener(new AbstractConnectionListener() {

        public void connectionClosed() {
            manager.disableService();
        }

    });

}
项目:EIM    文件:Socks5BytestreamManager.java   
public void connectionCreated(Connection connection) {
    final Socks5BytestreamManager manager;
    manager = Socks5BytestreamManager.getBytestreamManager(connection);

    // register shutdown listener
    connection.addConnectionListener(new AbstractConnectionListener() {

        public void connectionClosed() {
            manager.disableService();
        }

    });
}
项目:androidclient    文件:XMPPTCPConnection.java   
/**
 * 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();
            }
        }
    });
}
项目:java-bells    文件:InBandBytestreamManager.java   
public void connectionCreated(Connection connection) {
    final InBandBytestreamManager manager;
    manager = InBandBytestreamManager.getByteStreamManager(connection);

    // register shutdown listener
    connection.addConnectionListener(new AbstractConnectionListener() {

        public void connectionClosed() {
            manager.disableService();
        }

    });

}
项目:java-bells    文件:Socks5BytestreamManager.java   
public void connectionCreated(Connection connection) {
    final Socks5BytestreamManager manager;
    manager = Socks5BytestreamManager.getBytestreamManager(connection);

    // register shutdown listener
    connection.addConnectionListener(new AbstractConnectionListener() {

        public void connectionClosed() {
            manager.disableService();
        }

    });
}
项目:telegraph    文件:InBandBytestreamManager.java   
public void connectionCreated(Connection connection) {
    final InBandBytestreamManager manager;
    manager = InBandBytestreamManager.getByteStreamManager(connection);

    // register shutdown listener
    connection.addConnectionListener(new AbstractConnectionListener() {

        public void connectionClosed() {
            manager.disableService();
        }

    });

}