@ChannelHandler.Sharable public class ObjectEncoder extends MessageToByteEncoder<Object>
ByteBuf
.
Please note that the serialized form this encoder produces is not
compatible with the standard ObjectInputStream
. Please use
ObjectDecoder
or ObjectDecoderInputStream
to ensure the
interoperability with this encoder.
Constructor and Description |
---|
ObjectEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
encode(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.buffer.ByteBuf out) |
boolean |
isEncodable(Object msg)
Returns
true if and only if the specified message can be encoded by this encoder. |
flush
newOutboundBuffer
afterAdd, afterRemove, beforeAdd, beforeRemove, bind, close, connect, deregister, disconnect, exceptionCaught, userEventTriggered
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean isEncodable(Object msg) throws Exception
MessageToByteEncoder
true
if and only if the specified message can be encoded by this encoder.isEncodable
in class MessageToByteEncoder<Object>
msg
- the messageException
Copyright © 2008-2012 The Netty Project. All Rights Reserved.