org.teiid.transport
Class ObjectDecoder
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.frame.FrameDecoder
org.teiid.transport.ObjectDecoder
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
public class ObjectDecoder
- extends org.jboss.netty.handler.codec.frame.FrameDecoder
A decoder which deserializes the received ChannelBuffers into Java
objects.
Please note that the serialized form this decoder expects is not
compatible with the standard ObjectOutputStream. Please use
ObjectEncoder or ObjectEncoderOutputStream to ensure the
interoperability with this decoder.
Unless there's a requirement for the interoperability with the standard
object streams, it is recommended to use ObjectEncoder and
ObjectDecoder rather than CompatibleObjectEncoder and
CompatibleObjectDecoder.
- Version:
- $Rev: 381 $, $Date: 2008-10-01 20:06:18 +0900 (Wed, 01 Oct 2008) $
- Author:
- The Netty Project (netty-dev@lists.jboss.org), Trustin Lee (tlee@redhat.com)
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
|
Constructor Summary |
ObjectDecoder(int maxObjectSize,
java.lang.ClassLoader classLoader,
StorageManager storageManager)
Creates a new decoder with the specified maximum object size. |
|
Method Summary |
protected java.lang.Object |
decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer)
|
| Methods inherited from class org.jboss.netty.handler.codec.frame.FrameDecoder |
channelClosed, channelDisconnected, decodeLast, exceptionCaught, messageReceived |
| 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 |
MAX_LOB_SIZE
public static final long MAX_LOB_SIZE
- See Also:
- Constant Field Values
ObjectDecoder
public ObjectDecoder(int maxObjectSize,
java.lang.ClassLoader classLoader,
StorageManager storageManager)
- Creates a new decoder with the specified maximum object size.
- Parameters:
maxObjectSize - the maximum byte length of the serialized object.
if the length of the received object is greater
than this value, StreamCorruptedException
will be raised.classLoader - the ClassLoader which will load the class
of the serialized object
decode
protected java.lang.Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer)
throws java.lang.Exception
- Specified by:
decode in class org.jboss.netty.handler.codec.frame.FrameDecoder
- Throws:
java.lang.Exception
Copyright © 2010. All Rights Reserved.