|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.filter.codec.ProtocolDecoderAdapter
org.apache.mina.filter.codec.CumulativeProtocolDecoder
org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder
public class ObjectSerializationDecoder
A ProtocolDecoder
which deserializes Serializable
Java
objects using IoBuffer.getObject(ClassLoader)
.
Constructor Summary | |
---|---|
ObjectSerializationDecoder()
Creates a new instance with the ClassLoader of
the current thread. |
|
ObjectSerializationDecoder(java.lang.ClassLoader classLoader)
Creates a new instance with the specified ClassLoader . |
Method Summary | |
---|---|
protected boolean |
doDecode(IoSession session,
IoBuffer in,
ProtocolDecoderOutput out)
Implement this method to consume the specified cumulative buffer and decode its content into message(s). |
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 |
Methods inherited from class org.apache.mina.filter.codec.ProtocolDecoderAdapter |
---|
finishDecode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectSerializationDecoder()
ClassLoader
of
the current thread.
public ObjectSerializationDecoder(java.lang.ClassLoader classLoader)
ClassLoader
.
Method Detail |
---|
public int getMaxObjectSize()
BufferDataException
. The default
value is 1048576 (1MB).
public void setMaxObjectSize(int maxObjectSize)
BufferDataException
. The default
value is 1048576 (1MB).
protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws java.lang.Exception
CumulativeProtocolDecoder
doDecode
in class CumulativeProtocolDecoder
in
- the cumulative buffer
java.lang.Exception
- if cannot decode in.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |