
CompatibleObjectEncoder, CompatibleObjectDecoder,
ObjectInputStream, and ObjectOutputStream with
ObjectEncoder, ObjectDecoder,
ObjectEncoderOutputStream, and
ObjectDecoderInputStream respectively. This workaround
requires both a client and a server to be modified.@Deprecated public class CompatibleObjectDecoder extends ReplayingDecoder<org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState>
ChannelBuffers into Java
objects (interoperability version).
This decoder is interoperable with the standard Java object
streams such as ObjectInputStream and ObjectOutputStream.
However, this decoder might perform worse than ObjectDecoder if
the serialized object is big and complex. Also, it does not limit the
maximum size of the object, and consequently your application might face
the risk of DoS attack.
Please use ObjectEncoder and ObjectDecoder if you are not
required to keep the interoperability with the standard object streams.
ChannelHandler.Sharablecumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS| Constructor and Description |
|---|
CompatibleObjectDecoder()
Deprecated.
Creates a new decoder.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state)
Deprecated.
Decodes the received packets so far into a frame.
|
protected Object |
decodeLast(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state)
Deprecated.
Decodes the received data so far into a frame when the channel is
disconnected.
|
protected ObjectInputStream |
newObjectInputStream(InputStream in)
Deprecated.
Creates a new
ObjectInputStream which wraps the specified
InputStream. |
checkpoint, checkpoint, cleanup, decode, decodeLast, getState, internalBuffer, messageReceived, setStateactualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, exceptionCaught, extractFrame, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, isUnfold, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulationchannelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeCompletepublic CompatibleObjectDecoder()
protected ObjectInputStream newObjectInputStream(InputStream in) throws Exception
ObjectInputStream which wraps the specified
InputStream. Override this method to use a subclass of the
ObjectInputStream.Exceptionprotected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state) throws Exception
ReplayingDecoderdecode in class ReplayingDecoder<org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState>ctx - the context of this handlerchannel - the current channelbuffer - the cumulative buffer of received packets so far.
Note that the buffer might be empty, which means you
should not make an assumption that the buffer contains
at least one byte in your decoder implementation.state - the current decoder state (null if unused)Exceptionprotected Object decodeLast(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state) throws Exception
ReplayingDecoderdecodeLast in class ReplayingDecoder<org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState>ctx - the context of this handlerchannel - the current channelbuffer - the cumulative buffer of received packets so far.
Note that the buffer might be empty, which means you
should not make an assumption that the buffer contains
at least one byte in your decoder implementation.state - the current decoder state (null if unused)ExceptionCopyright © 2008-2014 The Netty Project. All Rights Reserved.