@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 informations
|Constructor and Description|
Creates a new encoder.
|Modifier and Type||Method and Description|
Encode a message into a
acceptOutboundMessage, allocateBuffer, write
bind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered
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–2015 The Netty Project. All rights reserved.