at.spardat.xma.serializer
Class SerializerFactory

java.lang.Object
  extended byat.spardat.xma.serializer.SerializerFactory
Direct Known Subclasses:
BaseRpcSerFactory, SerializerFactoryClient, SerializerFactoryServer

public abstract class SerializerFactory
extends java.lang.Object

Factory to create Serializers and Deserializers. An instance of SerializerFactoryClient or SerializerFactoryServer must be created.


Field Summary
static java.lang.String PROP_KEY
          Property key
static java.lang.String SER_ASCII
          Constant for ascii
static java.lang.String SER_BINARY
          Constant for binary
static java.lang.String SER_TASCII
          Constant for tagged ascii
static java.lang.String SYS_PROP_KEY
          Key for system property
 
Constructor Summary
SerializerFactory()
           
 
Method Summary
 Deserializer createDeserializer(XMASession session, byte[] data)
          Creates a new Deserializer with input data.
 Deserializer createDeserializer(XMASession session, byte[] data, int offset, int len)
          Creates a new Deserializer with input data (first len bytes are taken into consideration).
 Serializer createSerializer(XMASession session, int bufferSize)
          Create a new Serializer with a given initial buffer size and returns it.
 java.lang.String getSerializationMode(XMASession session)
          Returns one of the SER_-constants that determine the current serialization mode.
abstract  java.lang.String getSerializationMode0(XMASession session)
          Returns one of the SER_-constants that determine the current serialization mode.
abstract  boolean isAtServer()
          Indicates if this is executing at the server
 boolean isModeBinary(XMASession session)
          Returns whether serialization mode is binary.
 void setSerializationMode(java.lang.String what)
          Allows to overwrite the properties and to force a particular mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SER_BINARY

public static final java.lang.String SER_BINARY
Constant for binary

See Also:
Constant Field Values

SER_ASCII

public static final java.lang.String SER_ASCII
Constant for ascii

See Also:
Constant Field Values

SER_TASCII

public static final java.lang.String SER_TASCII
Constant for tagged ascii

See Also:
Constant Field Values

PROP_KEY

public static final java.lang.String PROP_KEY
Property key

See Also:
Constant Field Values

SYS_PROP_KEY

public static final java.lang.String SYS_PROP_KEY
Key for system property

See Also:
Constant Field Values
Constructor Detail

SerializerFactory

public SerializerFactory()
Method Detail

createSerializer

public Serializer createSerializer(XMASession session,
                                   int bufferSize)
Create a new Serializer with a given initial buffer size and returns it.

Parameters:
session - may be null at the server

createDeserializer

public Deserializer createDeserializer(XMASession session,
                                       byte[] data,
                                       int offset,
                                       int len)
Creates a new Deserializer with input data (first len bytes are taken into consideration).

Parameters:
session - may be null at the server

createDeserializer

public Deserializer createDeserializer(XMASession session,
                                       byte[] data)
Creates a new Deserializer with input data.

Parameters:
session - XMASession. May be null at the server.
data - input data

isModeBinary

public boolean isModeBinary(XMASession session)
Returns whether serialization mode is binary.

Parameters:
session - may be null at the server

getSerializationMode

public java.lang.String getSerializationMode(XMASession session)
Returns one of the SER_-constants that determine the current serialization mode.


getSerializationMode0

public abstract java.lang.String getSerializationMode0(XMASession session)
Returns one of the SER_-constants that determine the current serialization mode.


isAtServer

public abstract boolean isAtServer()
Indicates if this is executing at the server


setSerializationMode

public void setSerializationMode(java.lang.String what)
Allows to overwrite the properties and to force a particular mode