ProtocolEncoderpublic class ObjectSerializationEncoder extends ProtocolEncoderAdapter
| Constructor | Description |
|---|---|
ObjectSerializationEncoder() |
Creates a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
encode(IoSession session,
java.lang.Object message,
ProtocolEncoderOutput out) |
Encodes higher-level message objects into binary or protocol-specific data.
|
int |
getMaxObjectSize() |
Returns the allowed maximum size of the encoded object.
|
void |
setMaxObjectSize(int maxObjectSize) |
Sets the allowed maximum size of the encoded object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisposepublic ObjectSerializationEncoder()
public int getMaxObjectSize()
IllegalArgumentException. The default value
is Integer.MAX_VALUE.public void setMaxObjectSize(int maxObjectSize)
IllegalArgumentException. The default value
is Integer.MAX_VALUE.public void encode(IoSession session, java.lang.Object message, ProtocolEncoderOutput out) throws java.lang.Exception
ProtocolEncoderProtocolEncoder.encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded ByteBuffers into
ProtocolEncoderOutput.java.lang.Exception - if the message violated protocol specification