INPUT
- the base type for message to encodepublic class ThriftMessageEncoder<INPUT extends org.apache.thrift.TBase<?,?>> extends ByteBufferEncoder<INPUT>
ByteBuffer
Constructor and Description |
---|
ThriftMessageEncoder() |
Modifier and Type | Method and Description |
---|---|
int |
getEncodedSize(INPUT message)
Computes the size of the serialized form of a message in bytes.
|
static <L extends org.apache.thrift.TBase<?,?>> |
newInstance(Class<L> clazz) |
void |
writeTo(INPUT message,
ByteBuffer buffer)
Writes a message on a
ByteBuffer . |
createEncoderState, encode, encode
public static <L extends org.apache.thrift.TBase<?,?>> ThriftMessageEncoder<L> newInstance(Class<L> clazz)
public int getEncodedSize(INPUT message)
getEncodedSize
in class ByteBufferEncoder<INPUT extends org.apache.thrift.TBase<?,?>>
message
- a message to be encodedpublic void writeTo(INPUT message, ByteBuffer buffer)
ByteBuffer
.
n.b. The buffer is expected to have at least a sufficient capacity to handle the serialized form of the message.
writeTo
in class ByteBufferEncoder<INPUT extends org.apache.thrift.TBase<?,?>>
message
- a message to be encodedbuffer
- a target ByteBuffer
Copyright © 2009–2013 Apache MINA Project. All rights reserved.