OUTPUT
- the base type for decoded messages.public class ThriftMessageDecoder<OUTPUT extends org.apache.thrift.TBase<?,?>> extends IoBufferDecoder<OUTPUT>
IoBuffer
into Thrift messages.Constructor and Description |
---|
ThriftMessageDecoder(Class<OUTPUT> clazz)
Create thrift message decoder
|
Modifier and Type | Method and Description |
---|---|
OUTPUT |
decode(IoBuffer input)
Decodes a message from a
IoBuffer
When a truncated input is given to this method it may return null. |
static <L extends org.apache.thrift.TBase<?,?>> |
newInstance(Class<L> clazz) |
createDecoderState, decode, finishDecode
public static <L extends org.apache.thrift.TBase<?,?>> ThriftMessageDecoder<L> newInstance(Class<L> clazz)
public OUTPUT decode(IoBuffer input)
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<OUTPUT extends org.apache.thrift.TBase<?,?>>
input
- data to be decoded as a TYPE messageCopyright © 2009–2013 Apache MINA Project. All rights reserved.