org.apache.qpid.server.protocol
Class AMQPFastProtocolHandler
java.lang.Object
org.apache.mina.common.IoHandlerAdapter
org.apache.qpid.server.protocol.AMQPFastProtocolHandler
- All Implemented Interfaces:
- org.apache.mina.common.IoHandler, org.apache.qpid.framing.ProtocolVersionList
- Direct Known Subclasses:
- ClusteredProtocolHandler
public class AMQPFastProtocolHandler
- extends org.apache.mina.common.IoHandlerAdapter
- implements org.apache.qpid.framing.ProtocolVersionList
The protocol handler handles "protocol events" for all connections. The state
associated with an individual connection is accessed through the protocol session.
We delegate all frame (message) processing to the AMQProtocolSession which wraps
the state for the connection.
| Fields inherited from interface org.apache.qpid.framing.ProtocolVersionList |
PROTOCOL_MAJOR, PROTOCOL_MINOR, pv |
|
Method Summary |
protected void |
createSession(org.apache.mina.common.IoSession session,
IApplicationRegistry applicationRegistry,
AMQCodecFactory codec)
Separated into its own, protected, method to allow easier reuse |
void |
exceptionCaught(org.apache.mina.common.IoSession protocolSession,
java.lang.Throwable throwable)
|
void |
messageReceived(org.apache.mina.common.IoSession protocolSession,
java.lang.Object message)
Invoked when a message is received on a particular protocol session. |
void |
messageSent(org.apache.mina.common.IoSession protocolSession,
java.lang.Object object)
Called after a message has been sent out on a particular protocol session |
void |
sessionClosed(org.apache.mina.common.IoSession protocolSession)
|
void |
sessionCreated(org.apache.mina.common.IoSession protocolSession)
|
void |
sessionIdle(org.apache.mina.common.IoSession session,
org.apache.mina.common.IdleStatus status)
|
void |
sessionOpened(org.apache.mina.common.IoSession protocolSession)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AMQPFastProtocolHandler
public AMQPFastProtocolHandler(java.lang.Integer applicationRegistryInstance)
AMQPFastProtocolHandler
public AMQPFastProtocolHandler(IApplicationRegistry applicationRegistry)
AMQPFastProtocolHandler
protected AMQPFastProtocolHandler(AMQPFastProtocolHandler handler)
sessionCreated
public void sessionCreated(org.apache.mina.common.IoSession protocolSession)
throws java.lang.Exception
- Specified by:
sessionCreated in interface org.apache.mina.common.IoHandler- Overrides:
sessionCreated in class org.apache.mina.common.IoHandlerAdapter
- Throws:
java.lang.Exception
createSession
protected void createSession(org.apache.mina.common.IoSession session,
IApplicationRegistry applicationRegistry,
AMQCodecFactory codec)
throws AMQException
- Separated into its own, protected, method to allow easier reuse
- Throws:
AMQException
sessionOpened
public void sessionOpened(org.apache.mina.common.IoSession protocolSession)
throws java.lang.Exception
- Specified by:
sessionOpened in interface org.apache.mina.common.IoHandler- Overrides:
sessionOpened in class org.apache.mina.common.IoHandlerAdapter
- Throws:
java.lang.Exception
sessionClosed
public void sessionClosed(org.apache.mina.common.IoSession protocolSession)
throws java.lang.Exception
- Specified by:
sessionClosed in interface org.apache.mina.common.IoHandler- Overrides:
sessionClosed in class org.apache.mina.common.IoHandlerAdapter
- Throws:
java.lang.Exception
sessionIdle
public void sessionIdle(org.apache.mina.common.IoSession session,
org.apache.mina.common.IdleStatus status)
throws java.lang.Exception
- Specified by:
sessionIdle in interface org.apache.mina.common.IoHandler- Overrides:
sessionIdle in class org.apache.mina.common.IoHandlerAdapter
- Throws:
java.lang.Exception
exceptionCaught
public void exceptionCaught(org.apache.mina.common.IoSession protocolSession,
java.lang.Throwable throwable)
throws java.lang.Exception
- Specified by:
exceptionCaught in interface org.apache.mina.common.IoHandler- Overrides:
exceptionCaught in class org.apache.mina.common.IoHandlerAdapter
- Throws:
java.lang.Exception
messageReceived
public void messageReceived(org.apache.mina.common.IoSession protocolSession,
java.lang.Object message)
throws java.lang.Exception
- Invoked when a message is received on a particular protocol session. Note that a
protocol session is directly tied to a particular physical connection.
- Specified by:
messageReceived in interface org.apache.mina.common.IoHandler- Overrides:
messageReceived in class org.apache.mina.common.IoHandlerAdapter
- Parameters:
protocolSession - the protocol session that received the messagemessage - the message itself (i.e. a decoded frame)
- Throws:
java.lang.Exception - if the message cannot be processed
messageSent
public void messageSent(org.apache.mina.common.IoSession protocolSession,
java.lang.Object object)
throws java.lang.Exception
- Called after a message has been sent out on a particular protocol session
- Specified by:
messageSent in interface org.apache.mina.common.IoHandler- Overrides:
messageSent in class org.apache.mina.common.IoHandlerAdapter
- Parameters:
protocolSession - the protocol session (i.e. connection) on which this
message was sentobject - the message (frame) that was encoded and sent
- Throws:
java.lang.Exception - if we want to indicate an error
Copyright © 2007. All Rights Reserved.