synergynetframework.appsystem.services.net.objectmessaging.utility.serializers
Class SimpleSerializer<T>

java.lang.Object
  extended by synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.Serializer
      extended by synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.SimpleSerializer<T>
Type Parameters:
T - the generic type

public abstract class SimpleSerializer<T>
extends Serializer

The Class SimpleSerializer.


Constructor Summary
SimpleSerializer()
           
 
Method Summary
abstract  T read(java.nio.ByteBuffer buffer)
          Read.
<E> E
readObjectData(ConnectionHandler connectionHandler, java.nio.ByteBuffer buffer, java.lang.Class<E> type, boolean lengthKnown)
          Read object data.
abstract  void write(java.nio.ByteBuffer buffer, T object)
          Write.
 void writeObjectData(ConnectionHandler connectionHandler, java.nio.ByteBuffer buffer, java.lang.Object object, boolean lengthKnown)
          Write object data.
 
Methods inherited from class synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.Serializer
newInstance, readNull, readObject, readObjectData, setCanBeNull, writeNull, writeObject, writeObjectData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSerializer

public SimpleSerializer()
Method Detail

read

public abstract T read(java.nio.ByteBuffer buffer)
                throws SerializationException
Read.

Parameters:
buffer - the buffer
Returns:
the t
Throws:
SerializationException - the serialization exception

readObjectData

public <E> E readObjectData(ConnectionHandler connectionHandler,
                            java.nio.ByteBuffer buffer,
                            java.lang.Class<E> type,
                            boolean lengthKnown)
                 throws SerializationException
Description copied from class: Serializer
Read object data.

Specified by:
readObjectData in class Serializer
Type Parameters:
E - the generic type
Parameters:
connectionHandler - the connection handler
buffer - the buffer
type - the type
lengthKnown - the length known
Returns:
the t
Throws:
SerializationException - the serialization exception

write

public abstract void write(java.nio.ByteBuffer buffer,
                           T object)
                    throws SerializationException
Write.

Parameters:
buffer - the buffer
object - the object
Throws:
SerializationException - the serialization exception

writeObjectData

public void writeObjectData(ConnectionHandler connectionHandler,
                            java.nio.ByteBuffer buffer,
                            java.lang.Object object,
                            boolean lengthKnown)
                     throws SerializationException
Description copied from class: Serializer
Write object data.

Specified by:
writeObjectData in class Serializer
Parameters:
connectionHandler - the connection handler
buffer - the buffer
object - the object
lengthKnown - the length known
Throws:
SerializationException - the serialization exception