@Override public void connectionCreated(XMPPConnection connection) { if (connection instanceof AbstractXMPPConnection) { ReconnectionManager.getInstanceFor((AbstractXMPPConnection) connection); } } });
ReconnectionManager.getInstanceFor(abstractXmppConnection).addReconnectionListener(reconnectionListener); } else { LOGGER.info("The connection instance " + connection
/** * Create new SLF4J Smack Debugger instance. * @param connection Smack connection to debug */ SLF4JSmackDebugger(XMPPConnection connection) { super(connection); this.writer = new ObservableWriter(writer); this.writer.addWriterListener(slf4JRawXmlListener); this.reader = new ObservableReader(Validate.notNull(reader)); this.reader.addReaderListener(slf4JRawXmlListener); final SLF4JLoggingConnectionListener loggingConnectionListener = new SLF4JLoggingConnectionListener(connection, logger); this.connection.addConnectionListener(loggingConnectionListener); if (connection instanceof AbstractXMPPConnection) { AbstractXMPPConnection abstractXmppConnection = (AbstractXMPPConnection) connection; ReconnectionManager.getInstanceFor(abstractXmppConnection).addReconnectionListener(loggingConnectionListener); } else { LOGGER.info("The connection instance " + connection + " is not an instance of AbstractXMPPConnection, thus we can not install the ReconnectionListener"); } }
ReconnectionManager.getInstanceFor(abstractXmppConnection).addReconnectionListener(reconnectionListener); } else { LOGGER.info("The connection instance " + connection
@Override public void connectionCreated(XMPPConnection connection) { if (connection instanceof AbstractXMPPConnection) { ReconnectionManager.getInstanceFor((AbstractXMPPConnection) connection); } } });
public void disconnectAll() { logger.info("Disconnecting all ..."); if (xmppConn.isConnected()) { logger.info("Detaching all the listeners for the connection."); PingManager.getInstanceFor(xmppConn).unregisterPingFailedListener(this); ReconnectionManager.getInstanceFor(xmppConn).removeReconnectionListener(this); xmppConn.removeAsyncStanzaListener(this); xmppConn.removeConnectionListener(this); xmppConn.removeStanzaInterceptor(this); xmppConn.removeAllRequestAckPredicates(); xmppConn.removeAllStanzaAcknowledgedListeners(); xmppConn.removeAllStanzaIdAcknowledgedListeners(); xmppConn.removeStanzaSendingListener(this); xmppConn.removeStanzaAcknowledgedListener(this); xmppConn.removeAllRequestAckPredicates(); logger.info("Disconnecting the xmpp server from FCM."); xmppConn.disconnect(); } }
ReconnectionManager.getInstanceFor(abstractXmppConnection).addReconnectionListener(reconnectionListener); } else { LOGGER.info("The connection instance " + connection
ReconnectionManager.getInstanceFor(xmppConn).enableAutomaticReconnection(); ReconnectionManager.getInstanceFor(xmppConn).addReconnectionListener(this);
sessionManager.setJID( connection.getUser() ); final ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor( connection ); reconnectionManager.setFixedDelay( localPref.getReconnectDelay() ); reconnectionManager.setReconnectionPolicy( ReconnectionManager.ReconnectionPolicy.FIXED_DELAY );
.getInstanceFor(connection) .addReconnectionListener(reConnListener); = ReconnectionManager.getInstanceFor(connection); if (reconnectionManager != null) reconnectionManager.removeReconnectionListener(reConnListener);