Class ClientConnectionHandler

  • All Implemented Interfaces:

    public class ClientConnectionHandler
    extends ConnectionHandler
    ConnectionHandler that knows which subclass of StanzaHandler should be created and how to build and configure a NIOConnection.
    Gaston Dombiak
    • Method Detail

      • sessionIdle

        public void sessionIdle​(org.apache.mina.core.session.IoSession session,
                                org.apache.mina.core.session.IdleStatus status)
                         throws Exception
        In addition to the functionality provided by the parent class, this method will send XMPP ping requests to the remote entity on every first invocation of this method (which will occur after a period of half the allowed connection idle time has passed, without any IO). XMPP entities must respond with either an IQ result or an IQ error (feature-unavailable) stanza upon receiving the XMPP ping stanza. Both responses will be received by Openfire and will cause the connection idle count to be reset. Entities that do not respond to the IQ Ping stanzas can be considered dead, and their connection will be closed by the parent class implementation on the second invocation of this method. Note that whitespace pings that are sent by XMPP entities will also cause the connection idle count to be reset.
        Specified by:
        sessionIdle in interface org.apache.mina.core.service.IoHandler
        sessionIdle in class ConnectionHandler
        See Also:
        ConnectionHandler.sessionIdle(IoSession, IdleStatus)