uka.transport
Interface Transportable

All Superinterfaces:
java.lang.Cloneable, DeepCloneable, java.io.Serializable

public interface Transportable
extends java.io.Serializable, DeepCloneable

Replaces java.io.Serializable for fast uka.transport marshaling. Unlike regular object serialization in java.io.Object[In|Out]putStream uka.transport marshaling does not rely on reflection and therefore needs custom marshaling and unmarshaling methods for transportable objects.

The requirements for a transportable object are described in the documentation for TransportDescriptor.

The default way of making a class transportable, is to declare the Transportable interface and provide a TransportDescriptor for the class. The TransportDescriptor redirects calls to the corresponding methods implemented for the Transportable interface.

Author:
Bernhard Haumacher
See Also:
DeepCloneable

Method Summary
 void marshal(MarshalStream s)
          Marshal the state of this object to the provided stream.
 void marshalReference(MarshalStream s)
          Marshal the state of this object to the provided stream.
 void unmarshal(UnmarshalStream s)
          Update this object with the state unmarshaled from the provided stream.
 

Method Detail

marshalReference

public void marshalReference(MarshalStream s)
                      throws java.io.IOException
Marshal the state of this object to the provided stream.

Throws:
java.io.IOException

marshal

public void marshal(MarshalStream s)
             throws java.io.IOException
Marshal the state of this object to the provided stream.

Throws:
java.io.IOException

unmarshal

public void unmarshal(UnmarshalStream s)
               throws java.lang.ClassNotFoundException,
                      java.io.IOException
Update this object with the state unmarshaled from the provided stream.

Throws:
java.lang.ClassNotFoundException
java.io.IOException