openlsd.network.common.codec.LSDSerializationCodecFactory Class Reference

Inheritance diagram for openlsd.network.common.codec.LSDSerializationCodecFactory:

Inheritance graph
[legend]
Collaboration diagram for openlsd.network.common.codec.LSDSerializationCodecFactory:

Collaboration graph
[legend]

List of all members.


Detailed Description

Small changes to the default implementation of serialization from Mina. (mainly size limits and free structures)

Author:
Frederic Bregier LGPL

Public Member Functions

 LSDSerializationCodecFactory ()
 LSDSerializationCodecFactory (ClassLoader classLoader)
ProtocolEncoder getEncoder (IoSession arg)
ProtocolDecoder getDecoder (IoSession arg0)
int getEncoderMaxObjectSize ()
void setEncoderMaxObjectSize (int maxObjectSize)
int getDecoderMaxObjectSize ()
void setDecoderMaxObjectSize (int maxObjectSize)

Private Attributes

final LSDSerializationEncoder encoder
final
LSDSerializationDecoderCumulative 
decoder

Constructor & Destructor Documentation

openlsd.network.common.codec.LSDSerializationCodecFactory.LSDSerializationCodecFactory (  ) 

Creates a new instance with the ClassLoader of the current thread.

openlsd.network.common.codec.LSDSerializationCodecFactory.LSDSerializationCodecFactory ( ClassLoader  classLoader  ) 

Creates a new instance with the specified ClassLoader.

Parameters:
classLoader 


Member Function Documentation

ProtocolEncoder openlsd.network.common.codec.LSDSerializationCodecFactory.getEncoder ( IoSession  arg  ) 

See also:
org.apache.mina.filter.codec.ProtocolCodecFactory.getEncoder(IoSession)

ProtocolDecoder openlsd.network.common.codec.LSDSerializationCodecFactory.getDecoder ( IoSession  arg0  ) 

See also:
org.apache.mina.filter.codec.ProtocolCodecFactory.getDecoder(IoSession)

int openlsd.network.common.codec.LSDSerializationCodecFactory.getEncoderMaxObjectSize (  ) 

Returns the allowed maximum size of the encoded object. If the size of the encoded object exceeds this value, the encoder will throw a IllegalArgumentException. The default value is Integer#MAX_VALUE.

This method does the same job with LSDSerializationEncoder#getMaxObjectSize().

Returns:
the allowed maximum size

void openlsd.network.common.codec.LSDSerializationCodecFactory.setEncoderMaxObjectSize ( int  maxObjectSize  ) 

Sets the allowed maximum size of the encoded object. If the size of the encoded object exceeds this value, the encoder will throw a IllegalArgumentException. The default value is Integer#MAX_VALUE.

This method does the same job with LSDSerializationEncoder#setMaxObjectSize(int).

Parameters:
maxObjectSize 

int openlsd.network.common.codec.LSDSerializationCodecFactory.getDecoderMaxObjectSize (  ) 

Returns the allowed maximum size of the object to be decoded. If the size of the object to be decoded exceeds this value, the decoder will throw a {BufferDataException}. The default value is Integer#MAX_VALUE.

This method does the same job with {LSDSerializationDecoder.getMaxObjectSize()}.

Returns:
the allowed maximum size

void openlsd.network.common.codec.LSDSerializationCodecFactory.setDecoderMaxObjectSize ( int  maxObjectSize  ) 

Sets the allowed maximum size of the object to be decoded. If the size of the object to be decoded exceeds this value, the decoder will throw a {BufferDataException}. The default value is Integer#MAX_VALUE.

This method does the same job with {LSDSerializationDecoder.setMaxObjectSize(int)}.

Parameters:
maxObjectSize 


Member Data Documentation

Encoder

Decoder


The documentation for this class was generated from the following file: