public abstract class AMQDecoder<T extends MethodProcessor> extends Object
One instance of this class is created per session, so any changes or configuration done at run time to the decoder will only affect decoding of the protocol session data to which is it bound.
TODO If protocol initiation decoder not needed, then don't create it. Probably not a big deal, but it adds to the per-session overhead.
Modifier | Constructor and Description |
---|---|
protected |
AMQDecoder(boolean expectProtocolInitiation,
T methodProcessor)
Creates a new AMQP decoder.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(MarkableDataInput msg) |
T |
getMethodProcessor() |
protected void |
processFrame(int channel,
byte type,
long bodySize,
MarkableDataInput in) |
void |
setExpectProtocolInitiation(boolean expectProtocolInitiation)
Sets the protocol initation flag, that determines whether decoding is handled by the data decoder of the protocol
initation decoder.
|
void |
setMaxFrameSize(int frameMax) |
protected AMQDecoder(boolean expectProtocolInitiation, T methodProcessor)
expectProtocolInitiation
- true if this decoder needs to handle protocol initiation.methodProcessor
- method processorpublic void setExpectProtocolInitiation(boolean expectProtocolInitiation)
expectProtocolInitiation
- true to use the protocol initiation decoder, false to use the
data decoder.public void setMaxFrameSize(int frameMax)
public T getMethodProcessor()
protected void decode(MarkableDataInput msg) throws IOException, AMQFrameDecodingException
IOException
AMQFrameDecodingException
protected void processFrame(int channel, byte type, long bodySize, MarkableDataInput in) throws AMQFrameDecodingException, IOException
AMQFrameDecodingException
IOException
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.