org.apache.mina.filter.codec.serialization

Class ObjectSerializationDecoder

Implemented Interfaces:
ProtocolDecoder

public class ObjectSerializationDecoder
extends CumulativeProtocolDecoder

A ProtocolDecoder which deserializes Serializable Java objects using ByteBuffer.getObject(ClassLoader).

Constructor Summary

ObjectSerializationDecoder()
Creates a new instance with the ClassLoader of the current thread.
ObjectSerializationDecoder(ClassLoader classLoader)
Creates a new instance with the specified ClassLoader.

Method Summary

protected boolean
doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out)
int
getMaxObjectSize()
Returns the allowed maximum size of the object to be decoded.
void
setMaxObjectSize(int maxObjectSize)
Sets the allowed maximum size of the object to be decoded.

Methods inherited from class org.apache.mina.filter.codec.CumulativeProtocolDecoder

decode, dispose, doDecode

Methods inherited from class org.apache.mina.filter.codec.ProtocolDecoderAdapter

dispose, finishDecode

Constructor Details

ObjectSerializationDecoder

public ObjectSerializationDecoder()
Creates a new instance with the ClassLoader of the current thread.

ObjectSerializationDecoder

public ObjectSerializationDecoder(ClassLoader classLoader)
Creates a new instance with the specified ClassLoader.

Method Details

doDecode

protected boolean doDecode(IoSession session,
                           ByteBuffer in,
                           ProtocolDecoderOutput out)
            throws Exception
Overrides:
doDecode in interface CumulativeProtocolDecoder

getMaxObjectSize

public int getMaxObjectSize()

setMaxObjectSize

public void setMaxObjectSize(int maxObjectSize)