MessageToByteEncoder implementation which uses JBoss Marshalling to marshal
an Object. Be aware that this encoder is not compatible with an other client that just use
JBoss Marshalling as it includes the size of every Object that gets serialized in
front of the Object itself.
Use this with MarshallingDecoder
See JBoss Marshalling website
for more information
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private final MarshallerProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | encode(ChannelHandlerContext
the ctx, Object ChannelHandlerContext which this MessageToByteEncoder belongs tothe message to encode msg, ByteBuf the out)ByteBuf into which the encoded message will be writtenImplements abstract io. ByteBuf.
|
| LENGTH_PLACEHOLDER | back to summary |
|---|---|
| private static final byte[] LENGTH_PLACEHOLDER | |
| provider | back to summary |
|---|---|
| private final MarshallerProvider provider | |
| MarshallingEncoder | back to summary |
|---|---|
| public MarshallingEncoder(MarshallerProvider provider) Creates a new encoder.
| |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception Implements abstract io. Doc from io. Encode a message into a
| |