|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.mina.io.IoHandlerAdapter org.apache.mina.examples.echoserver.EchoProtocolHandler
public class EchoProtocolHandler
IoHandler
implementation for echo server.
Constructor Summary | |
---|---|
EchoProtocolHandler()
|
Method Summary | |
---|---|
void |
dataRead(IoSession session,
ByteBuffer rb)
Invoked when data is read from the connection. |
void |
exceptionCaught(IoSession session,
Throwable cause)
Invoked when any exception is thrown by user IoHandler
implementation or by MINA. |
void |
sessionCreated(IoSession session)
Invoked when the session is created. |
void |
sessionIdle(IoSession session,
IdleStatus status)
Invoked when the connection is idle. |
Methods inherited from class org.apache.mina.io.IoHandlerAdapter |
---|
dataWritten, sessionClosed, sessionOpened |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EchoProtocolHandler()
Method Detail |
---|
public void sessionCreated(IoSession session)
IoHandler
sessionCreated
in interface IoHandler
sessionCreated
in class IoHandlerAdapter
public void sessionIdle(IoSession session, IdleStatus status)
IoHandler
IdleStatus
. This
method is not invoked if the transport type is UDP.
sessionIdle
in interface IoHandler
sessionIdle
in class IoHandlerAdapter
public void exceptionCaught(IoSession session, Throwable cause)
IoHandler
IoHandler
implementation or by MINA. If cause
is instanceof
IOException
, MINA will close the connection automatically.
exceptionCaught
in interface IoHandler
exceptionCaught
in class IoHandlerAdapter
public void dataRead(IoSession session, ByteBuffer rb)
IoHandler
buf
to get read data. buf
returns to
the internal buffer pool of MINA after this method is invoked, so
please don't try to reuse it.
dataRead
in interface IoHandler
dataRead
in class IoHandlerAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |