|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 IoHandlersessionCreated in class IoHandlerAdapter
public void sessionIdle(IoSession session,
IdleStatus status)
IoHandlerIdleStatus. This
method is not invoked if the transport type is UDP.
sessionIdle in interface IoHandlersessionIdle in class IoHandlerAdapter
public void exceptionCaught(IoSession session,
Throwable cause)
IoHandlerIoHandler
implementation or by MINA. If cause is instanceof
IOException, MINA will close the connection automatically.
exceptionCaught in interface IoHandlerexceptionCaught in class IoHandlerAdapter
public void dataRead(IoSession session,
ByteBuffer rb)
IoHandlerbuf 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 IoHandlerdataRead in class IoHandlerAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||