|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.filter.codec.ProtocolEncoderAdapter
org.apache.mina.filter.codec.serialization.ObjectSerializationEncoder
public class ObjectSerializationEncoder
A ProtocolEncoder
which serializes Serializable
Java objects
using IoBuffer.putObject(Object)
.
Constructor Summary | |
---|---|
ObjectSerializationEncoder()
Creates a new instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.mina.filter.codec.ProtocolEncoderAdapter |
---|
dispose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectSerializationEncoder()
Method Detail |
---|
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
ProtocolEncoder
ProtocolEncoder.encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded messages (typically IoBuffer
s)
into ProtocolEncoderOutput
.
java.lang.Exception
- if the message violated protocol specification
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |