Package org.jivesoftware.openfire.nio
Class ClientConnectionHandler
- java.lang.Object
-
- org.apache.mina.core.service.IoHandlerAdapter
-
- org.jivesoftware.openfire.nio.ConnectionHandler
-
- org.jivesoftware.openfire.nio.ClientConnectionHandler
-
- All Implemented Interfaces:
org.apache.mina.core.service.IoHandler
public class ClientConnectionHandler extends ConnectionHandler
ConnectionHandler that knows which subclass ofStanzaHandler
should be created and how to build and configure aNIOConnection
.- Author:
- Gaston Dombiak
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.openfire.nio.ConnectionHandler
configuration
-
-
Constructor Summary
Constructors Constructor Description ClientConnectionHandler(ConnectionConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sessionIdle(org.apache.mina.core.session.IoSession session, org.apache.mina.core.session.IdleStatus status)
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).-
Methods inherited from class org.jivesoftware.openfire.nio.ConnectionHandler
exceptionCaught, messageReceived, messageSent, sessionClosed, sessionOpened
-
-
-
-
Constructor Detail
-
ClientConnectionHandler
public ClientConnectionHandler(ConnectionConfiguration configuration)
-
-
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 interfaceorg.apache.mina.core.service.IoHandler
- Overrides:
sessionIdle
in classConnectionHandler
- Throws:
Exception
- See Also:
ConnectionHandler.sessionIdle(IoSession, IdleStatus)
-
-