org.apache.qpid.codec
Class AMQCodecFactory
java.lang.Object
org.apache.qpid.codec.AMQCodecFactory
- All Implemented Interfaces:
- org.apache.mina.filter.codec.ProtocolCodecFactory
public class AMQCodecFactory
- extends Object
- implements org.apache.mina.filter.codec.ProtocolCodecFactory
AMQCodecFactory is a Mina codec factory. It supplies the encoders and decoders need to read and write the bytes to
the wire.
CRC Card
Responsibilities | Collaborations.
|
---|
Supply the protocol encoder. | AMQEncoder
|
Supply the protocol decoder. | AMQDecoder
|
Constructor Summary |
AMQCodecFactory(boolean expectProtocolInitiation,
AMQVersionAwareProtocolSession session)
Creates a new codec factory, specifiying whether it is expected that the first frame of data should be an
initiation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AMQCodecFactory
public AMQCodecFactory(boolean expectProtocolInitiation,
AMQVersionAwareProtocolSession session)
- Creates a new codec factory, specifiying whether it is expected that the first frame of data should be an
initiation. This is the case for the broker, which always expects to received the protocol initiation on a newly
connected client.
- Parameters:
expectProtocolInitiation
- true if the first frame received is going to be a protocol initiation
frame, false if it is going to be a standard AMQ data block.
getEncoder
public org.apache.mina.filter.codec.ProtocolEncoder getEncoder()
- Gets the AMQP encoder.
- Specified by:
getEncoder
in interface org.apache.mina.filter.codec.ProtocolCodecFactory
- Returns:
- The AMQP encoder.
getDecoder
public AMQDecoder getDecoder()
- Gets the AMQP decoder.
- Specified by:
getDecoder
in interface org.apache.mina.filter.codec.ProtocolCodecFactory
- Returns:
- The AMQP decoder.
Licensed to the Apache Software Foundation