@Deprecated public class SingleSessionIoHandlerAdapter extends java.lang.Object implements SingleSessionIoHandler
SingleSessionIoHandler
interface. The session to which the handler is assigned is accessible
through the getSession()
method.构造器和说明 |
---|
SingleSessionIoHandlerAdapter(IoSession session)
已过时。
Creates a new instance that is assigned to the passed in session.
|
限定符和类型 | 方法和说明 |
---|---|
void |
exceptionCaught(java.lang.Throwable th)
已过时。
Invoked when any exception is thrown by user
IoHandler
implementation or by MINA. |
protected IoSession |
getSession()
已过时。
Retrieves the session to which this handler is assigned.
|
void |
inputClosed(IoSession session)
已过时。
Invoked when a half-duplex connection is closed
|
void |
messageReceived(java.lang.Object message)
已过时。
Invoked when protocol message is received.
|
void |
messageSent(java.lang.Object message)
已过时。
Invoked when protocol message that user requested by
IoSession.write(Object) is sent out actually. |
void |
sessionClosed()
已过时。
Invoked when the connection is closed.
|
void |
sessionCreated()
已过时。
Invoked when the session is created.
|
void |
sessionIdle(IdleStatus status)
已过时。
Invoked when the connection is idle.
|
void |
sessionOpened()
已过时。
Invoked when the connection is opened.
|
public SingleSessionIoHandlerAdapter(IoSession session)
session
- the session to which the handler is assignedprotected IoSession getSession()
public void exceptionCaught(java.lang.Throwable th) throws java.lang.Exception
SingleSessionIoHandler
IoHandler
implementation or by MINA. If cause
is instanceof
IOException
, MINA will close the connection automatically.exceptionCaught
在接口中 SingleSessionIoHandler
th
- the caught exceptionjava.lang.Exception
- If the exception can't be handledIoHandler.exceptionCaught(IoSession, Throwable)
public void inputClosed(IoSession session)
SingleSessionIoHandler
inputClosed
在接口中 SingleSessionIoHandler
session
- The current sessionpublic void messageReceived(java.lang.Object message) throws java.lang.Exception
SingleSessionIoHandler
messageReceived
在接口中 SingleSessionIoHandler
message
- the received messagejava.lang.Exception
- If the received message can't be processedIoHandler.messageReceived(IoSession, Object)
public void messageSent(java.lang.Object message) throws java.lang.Exception
SingleSessionIoHandler
IoSession.write(Object)
is sent out actually.messageSent
在接口中 SingleSessionIoHandler
message
- the sent messagejava.lang.Exception
- If the sent message can't be processedIoHandler.messageSent(IoSession, Object)
public void sessionClosed() throws java.lang.Exception
SingleSessionIoHandler
sessionClosed
在接口中 SingleSessionIoHandler
java.lang.Exception
- If the session can't be closedIoHandler.sessionClosed(IoSession)
public void sessionCreated() throws java.lang.Exception
SingleSessionIoHandler
sessionCreated
在接口中 SingleSessionIoHandler
java.lang.Exception
- If the session can't be createdIoHandler.sessionCreated(IoSession)
public void sessionIdle(IdleStatus status) throws java.lang.Exception
SingleSessionIoHandler
IdleStatus
. This
method is not invoked if the transport type is UDP.sessionIdle
在接口中 SingleSessionIoHandler
status
- the type of idlenessjava.lang.Exception
- If the idle event can't be handledIoHandler.sessionIdle(IoSession, IdleStatus)
public void sessionOpened() throws java.lang.Exception
SingleSessionIoHandler
sessionOpened
在接口中 SingleSessionIoHandler
java.lang.Exception
- If the session can't be openedIoHandler.sessionOpened(IoSession)