@Deprecated @ChannelHandler.Sharable public class ObjectEncoder extends MessageToByteEncoder<Serializable>
Please note that the serialized form this encoder produces is not
compatible with the standard
ObjectInputStream. Please use
ObjectDecoderInputStream to ensure the
interoperability with this encoder.
Security: serialization can be a security liability, and should not be used without defining a list of classes that are allowed to be desirialized. Such a list can be specified with the jdk.serialFilter system property, for instance. See the serialization filtering article for more information.
|Constructor and Description|
|Modifier and Type||Method and Description|
Encode a message into a
acceptOutboundMessage, allocateBuffer, isPreferDirect, 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, Serializable msg, ByteBuf out) throws Exception
ByteBuf. This method will be called for each written message that can be handled by this encoder.
Copyright © 2008–2023 The Netty Project. All rights reserved.