@ChannelHandler.Sharable public class MarshallingEncoder extends MessageToByteEncoder<Object>
MessageToByteEncoderimplementation 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
Objectthat gets serialized in front of the
Objectitself. Use this with
MarshallingDecoderSee JBoss Marshalling website for more information
|Constructor and Description|
Creates a new encoder.
|Modifier and Type||Method and Description|
Encode a message into a
acceptOutboundMessage, allocateBuffer, write
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception
ByteBuf. This method will be called for each written message that can be handled by this encoder.
Copyright © 2008–2017 The Netty Project. All rights reserved.