ProtocolDecoderpublic class ObjectSerializationDecoder extends CumulativeProtocolDecoder
ProtocolDecoder which deserializes Serializable Java
objects using IoBuffer.getObject(ClassLoader).| Constructor | Description |
|---|---|
ObjectSerializationDecoder() |
Creates a new instance with the
ClassLoader of
the current thread. |
ObjectSerializationDecoder(ClassLoader classLoader) |
Creates a new instance with the specified
ClassLoader. |
| Modifier and Type | Method | Description |
|---|---|---|
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() |
|
void |
setMaxObjectSize(int maxObjectSize) |
Sets the allowed maximum size of the object to be decoded.
|
decode, dispose, setTransportMetadataFragmentationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfinishDecodepublic ObjectSerializationDecoder()
ClassLoader of
the current thread.public ObjectSerializationDecoder(ClassLoader classLoader)
ClassLoader.classLoader - The class loader to usepublic int getMaxObjectSize()
BufferDataException. The default
value is 1048576 (1MB).public void setMaxObjectSize(int maxObjectSize)
BufferDataException. The default
value is 1048576 (1MB).maxObjectSize - The maximum size for an object to be decodedprotected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception
doDecode in class CumulativeProtocolDecodersession - The current Sessionin - the cumulative bufferout - The ProtocolDecoderOutput that will receive the decoded messageException - if cannot decode in.Copyright © 2004–2018 Apache MINA Project. All rights reserved.