public abstract class ConnectionHandler
extends org.apache.mina.core.service.IoHandlerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionConfiguration |
configuration
The configuration for new connections.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ConnectionHandler(ConnectionConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionCaught(org.apache.mina.core.session.IoSession session,
Throwable cause) |
void |
messageReceived(org.apache.mina.core.session.IoSession session,
Object message) |
void |
messageSent(org.apache.mina.core.session.IoSession session,
Object message) |
void |
sessionClosed(org.apache.mina.core.session.IoSession session) |
void |
sessionIdle(org.apache.mina.core.session.IoSession session,
org.apache.mina.core.session.IdleStatus status)
Invoked when a MINA session has been idle for half of the allowed XMPP
session idle time as specified by
getMaxIdleTime(). |
void |
sessionOpened(org.apache.mina.core.session.IoSession session) |
protected final ConnectionConfiguration configuration
protected ConnectionHandler(ConnectionConfiguration configuration)
public void sessionOpened(org.apache.mina.core.session.IoSession session)
throws Exception
sessionOpened in interface org.apache.mina.core.service.IoHandlersessionOpened in class org.apache.mina.core.service.IoHandlerAdapterExceptionpublic void sessionClosed(org.apache.mina.core.session.IoSession session)
throws Exception
sessionClosed in interface org.apache.mina.core.service.IoHandlersessionClosed in class org.apache.mina.core.service.IoHandlerAdapterExceptionpublic void sessionIdle(org.apache.mina.core.session.IoSession session,
org.apache.mina.core.session.IdleStatus status)
throws Exception
getMaxIdleTime(). This method
will be invoked each time that such a period passes (even if no IO has
occurred in between).
Openfire will disconnect a session the second time this method is
invoked, if no IO has occurred between the first and second invocation.
This allows extensions of this class to use the first invocation to check
for livelyness of the MINA session (e.g by polling the remote entity, as
ClientConnectionHandler does).sessionIdle in interface org.apache.mina.core.service.IoHandlersessionIdle in class org.apache.mina.core.service.IoHandlerAdapterExceptionIoHandlerAdapter.sessionIdle(IoSession, IdleStatus)public void exceptionCaught(org.apache.mina.core.session.IoSession session,
Throwable cause)
throws Exception
exceptionCaught in interface org.apache.mina.core.service.IoHandlerexceptionCaught in class org.apache.mina.core.service.IoHandlerAdapterExceptionpublic void messageReceived(org.apache.mina.core.session.IoSession session,
Object message)
throws Exception
messageReceived in interface org.apache.mina.core.service.IoHandlermessageReceived in class org.apache.mina.core.service.IoHandlerAdapterExceptionCopyright © 2003-2008 Jive Software.