@Deprecated public class SingleSessionIoHandlerAdapter extends Object implements SingleSessionIoHandler
SingleSessionIoHandler
interface. The session to which the handler is assigned is accessible
through the getSession() method.Constructor and Description |
---|
SingleSessionIoHandlerAdapter(IoSession session)
Deprecated.
Creates a new instance that is assigned to the passed in session.
|
Modifier and Type | Method and Description |
---|---|
void |
event(FilterEvent event)
Deprecated.
Invoked when a filter event is fired.
|
void |
exceptionCaught(Throwable th)
Deprecated.
Invoked when any exception is thrown by user
IoHandler
implementation or by MINA. |
protected IoSession |
getSession()
Deprecated.
Retrieves the session to which this handler is assigned.
|
void |
inputClosed(IoSession session)
Deprecated.
Invoked when a half-duplex connection is closed
|
void |
messageReceived(Object message)
Deprecated.
Invoked when protocol message is received.
|
void |
messageSent(Object message)
Deprecated.
Invoked when protocol message that user requested by
IoSession.write(Object) is sent out actually. |
void |
sessionClosed()
Deprecated.
Invoked when the connection is closed.
|
void |
sessionCreated()
Deprecated.
Invoked when the session is created.
|
void |
sessionIdle(IdleStatus status)
Deprecated.
Invoked when the connection is idle.
|
void |
sessionOpened()
Deprecated.
Invoked when the connection is opened.
|
public SingleSessionIoHandlerAdapter(IoSession session)
session
- the session to which the handler is assignedprotected IoSession getSession()
public void exceptionCaught(Throwable th) throws Exception
IoHandler
implementation or by MINA. If cause
is instanceof
IOException
, MINA will close the connection automatically.exceptionCaught
in interface SingleSessionIoHandler
th
- the caught exceptionException
- If the exception can't be handledIoHandler.exceptionCaught(IoSession, Throwable)
public void inputClosed(IoSession session)
inputClosed
in interface SingleSessionIoHandler
session
- The current sessionpublic void messageReceived(Object message) throws Exception
messageReceived
in interface SingleSessionIoHandler
message
- the received messageException
- If the received message can't be processedIoHandler.messageReceived(IoSession, Object)
public void messageSent(Object message) throws Exception
IoSession.write(Object)
is sent out actually.messageSent
in interface SingleSessionIoHandler
message
- the sent messageException
- If the sent message can't be processedIoHandler.messageSent(IoSession, Object)
public void sessionClosed() throws Exception
sessionClosed
in interface SingleSessionIoHandler
Exception
- If the session can't be closedIoHandler.sessionClosed(IoSession)
public void sessionCreated() throws Exception
sessionCreated
in interface SingleSessionIoHandler
Exception
- If the session can't be createdIoHandler.sessionCreated(IoSession)
public void sessionIdle(IdleStatus status) throws Exception
IdleStatus
. This
method is not invoked if the transport type is UDP.sessionIdle
in interface SingleSessionIoHandler
status
- the type of idlenessException
- If the idle event can't be handledIoHandler.sessionIdle(IoSession, IdleStatus)
public void sessionOpened() throws Exception
sessionOpened
in interface SingleSessionIoHandler
Exception
- If the session can't be openedIoHandler.sessionOpened(IoSession)
public void event(FilterEvent event) throws Exception
event
in interface SingleSessionIoHandler
event
- The event to processException
- If we get an exception while processing the eventCopyright © 2004–2022 Apache MINA Project. All rights reserved.