public class ThriftDynamicMessageDecoder extends IoBufferDecoder<ThriftDynamicMessageDecoder.ThriftSerializedMessage>
Modifier and Type | Class and Description |
---|---|
static class |
ThriftDynamicMessageDecoder.ThriftSerializedMessage |
Constructor and Description |
---|
ThriftDynamicMessageDecoder() |
Modifier and Type | Method and Description |
---|---|
ThriftDynamicMessageDecoder.ThriftSerializedMessage |
decode(IoBuffer buffer)
Decodes a message from a
IoBuffer
When a truncated input is given to this method it may return null. |
static ThriftDynamicMessageDecoder |
newInstance() |
createDecoderState, decode, finishDecode
public ThriftDynamicMessageDecoder.ThriftSerializedMessage decode(IoBuffer buffer)
IoBufferDecoder
IoBuffer
When a truncated input is given to this method it may return null. Not all decoder will be able to detect this issue and report it that way. Thanks to prefixing of messages, decoder will only receive appropriately sized ByteBuffers.
n.b. The decoders used for the prefixing (i.e. RawInt32
and
VarInt
) have to detect truncated ByteBuffers.
decode
in class IoBufferDecoder<ThriftDynamicMessageDecoder.ThriftSerializedMessage>
buffer
- data to be decoded as a TYPE messagepublic static ThriftDynamicMessageDecoder newInstance()
Copyright © 2009–2013 Apache MINA Project. All rights reserved.