类org.jivesoftware.smack.ConnectionListener源码实例Demo

下面列出了怎么用org.jivesoftware.smack.ConnectionListener的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: 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 ConnectionListener() {
        @Override
        public void connectionClosedOnError(Exception e) {
            if (e instanceof XMPPException.StreamErrorException || e instanceof StreamManagementException) {
                dropSmState();
            }
        }
    });

    // Re-init the reader and writer in case of SASL <success/>. This is done to reset the parser since a new stream
    // is initiated.
    buildNonzaCallback().listenFor(SaslNonza.Success.class, s -> resetParser()).install();
}
 
源代码2 项目: androidpn-client   文件: XmppManager.java
public ConnectionListener getConnectionListener() {
    return connectionListener;
}
 
源代码3 项目: AndroidPNClient   文件: XmppManager.java
public ConnectionListener getConnectionListener() {
    return connectionListener;
}
 
源代码4 项目: android-demo-xmpp-androidpn   文件: XmppManager.java
public ConnectionListener getConnectionListener() {
    return connectionListener;
}
 
 类所在包
 类方法
 同包方法