|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.protocol.ProtocolHandlerAdapter
org.apache.mina.protocol.handler.DemuxingProtocolHandler
public class DemuxingProtocolHandler
A ProtocolHandler
that demuxes messageReceived
events
to the appropriate MessageHandler
.
You can freely register and deregister MessageHandler
s using
registerMessageType(Class, MessageHandler)
and
deregisterMessageType(Class)
.
Constructor Summary | |
---|---|
protected |
DemuxingProtocolHandler()
Creates a new instance with no registered MessageHandler s. |
Method Summary | |
---|---|
void |
deregisterMessageType(Class clazz)
Deregisters a MessageHandler that receives the messages of
the specified type . |
void |
messageReceived(ProtocolSession session,
Object message)
Forwards the received events into the appropriate MessageHandler
which is registered by registerMessageType(Class, MessageHandler) . |
void |
registerMessageType(Class type,
MessageHandler handler)
Registers a MessageHandler that receives the messages of
the specified type . |
Methods inherited from class org.apache.mina.protocol.ProtocolHandlerAdapter |
---|
exceptionCaught, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DemuxingProtocolHandler()
MessageHandler
s.
Method Detail |
---|
public void registerMessageType(Class type, MessageHandler handler)
MessageHandler
that receives the messages of
the specified type
.
public void deregisterMessageType(Class clazz)
MessageHandler
that receives the messages of
the specified type
.
public void messageReceived(ProtocolSession session, Object message)
MessageHandler
which is registered by registerMessageType(Class, MessageHandler)
.
messageReceived
in interface ProtocolHandler
messageReceived
in class ProtocolHandlerAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |