|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.mina.protocol.ProtocolHandlerAdapter
public class ProtocolHandlerAdapter
An abstract adapter class for ProtocolHandler. You can extend this
class and selectively override required event handler methods only. All
methods do nothing by default.
| Constructor Summary | |
|---|---|
ProtocolHandlerAdapter()
|
|
| Method Summary | |
|---|---|
void |
exceptionCaught(ProtocolSession session,
java.lang.Throwable cause)
Invoked when any exception is thrown by user ProtocolHandler
implementation or by MINA. |
void |
messageReceived(ProtocolSession session,
java.lang.Object message)
Invoked when protocol message is received. |
void |
messageSent(ProtocolSession session,
java.lang.Object message)
Invoked when protocol message that user requested by ProtocolSession.write(Object) is sent out actually. |
void |
sessionClosed(ProtocolSession session)
Invoked when the connection is closed. |
void |
sessionCreated(ProtocolSession session)
Invoked when the session is created. |
void |
sessionIdle(ProtocolSession session,
IdleStatus status)
Invoked when the connection is idle. |
void |
sessionOpened(ProtocolSession session)
Invoked when the connection is opened. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProtocolHandlerAdapter()
| Method Detail |
|---|
public void sessionCreated(ProtocolSession session)
throws java.lang.Exception
ProtocolHandler
sessionCreated in interface ProtocolHandlerjava.lang.Exception
public void sessionOpened(ProtocolSession session)
throws java.lang.Exception
ProtocolHandler
sessionOpened in interface ProtocolHandlerjava.lang.Exception
public void sessionClosed(ProtocolSession session)
throws java.lang.Exception
ProtocolHandler
sessionClosed in interface ProtocolHandlerjava.lang.Exception
public void sessionIdle(ProtocolSession session,
IdleStatus status)
throws java.lang.Exception
ProtocolHandlerIdleStatus. This
method is not invoked if the transport type is UDP.
sessionIdle in interface ProtocolHandlerjava.lang.Exception
public void exceptionCaught(ProtocolSession session,
java.lang.Throwable cause)
throws java.lang.Exception
ProtocolHandlerProtocolHandler
implementation or by MINA. If cause is instanceof
IOException, MINA will close the connection automatically.
exceptionCaught in interface ProtocolHandlerjava.lang.Exception
public void messageReceived(ProtocolSession session,
java.lang.Object message)
throws java.lang.Exception
ProtocolHandler
messageReceived in interface ProtocolHandlerjava.lang.Exception
public void messageSent(ProtocolSession session,
java.lang.Object message)
throws java.lang.Exception
ProtocolHandlerProtocolSession.write(Object) is sent out actually.
messageSent in interface ProtocolHandlerjava.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||