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.
|
protected static String |
CONNECTION |
protected static String |
HANDLER |
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 static final String HANDLER
protected static final String CONNECTION
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.IoHandler
sessionOpened
in class org.apache.mina.core.service.IoHandlerAdapter
Exception
public void sessionClosed(org.apache.mina.core.session.IoSession session) throws Exception
sessionClosed
in interface org.apache.mina.core.service.IoHandler
sessionClosed
in class org.apache.mina.core.service.IoHandlerAdapter
Exception
public 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.IoHandler
sessionIdle
in class org.apache.mina.core.service.IoHandlerAdapter
Exception
IoHandlerAdapter.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.IoHandler
exceptionCaught
in class org.apache.mina.core.service.IoHandlerAdapter
Exception
public void messageReceived(org.apache.mina.core.session.IoSession session, Object message) throws Exception
messageReceived
in interface org.apache.mina.core.service.IoHandler
messageReceived
in class org.apache.mina.core.service.IoHandlerAdapter
Exception
Copyright © 2003-2008 Jive Software.