|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.replay.ReplayingDecoder<org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState>
org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoder
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

A decoder which deserializes the received 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
|---|
ChannelHandler.Sharable |
| Constructor Summary | |
|---|---|
CompatibleObjectDecoder()
Deprecated. Creates a new decoder. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.jboss.netty.handler.codec.replay.ReplayingDecoder |
|---|
actualReadableBytes, channelClosed, channelDisconnected, checkpoint, checkpoint, exceptionCaught, getState, internalBuffer, messageReceived, setState |
| Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
|---|
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompatibleObjectDecoder()
| Method Detail |
|---|
protected ObjectInputStream newObjectInputStream(InputStream in)
throws Exception
ObjectInputStream which wraps the specified
InputStream. Override this method to use a subclass of the
ObjectInputStream.
Exception
protected Object decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state)
throws Exception
ReplayingDecoder
decode 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)
Exception
protected Object decodeLast(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
org.jboss.netty.handler.codec.serialization.CompatibleObjectDecoderState state)
throws Exception
ReplayingDecoder
decodeLast 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)
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||