@ChannelHandler.Sharable public class CompatibleMarshallingEncoder extends OneToOneEncoder
OneToOneEncoder implementation which uses JBoss Marshalling to marshal
an Object.
See JBoss Marshalling website
for more informations
Use MarshallingEncoder if possible.ChannelHandler.Sharable| Constructor and Description |
|---|
CompatibleMarshallingEncoder(MarshallerProvider provider)
Create a new instance of the
CompatibleMarshallingEncoder |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
encode(ChannelHandlerContext ctx,
Channel channel,
Object msg)
Transforms the specified message into another message and return the
transformed message.
|
doEncode, handleDownstreampublic CompatibleMarshallingEncoder(MarshallerProvider provider)
CompatibleMarshallingEncoderprovider - the MarshallerProvider to use to get the Marshaller for a Channelprotected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception
OneToOneEncodernull, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object);
you must return something, at least ChannelBuffers.EMPTY_BUFFER.encode in class OneToOneEncoderExceptionCopyright © 2008-2016 The Netty Project. All Rights Reserved.