|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.transport.TransportDescriptor
A transport descriptor either provides access to an object's mashaling and unmarshaling routines, or implements marshaling outside the object's class. The second case is useful, when marshaling functionality should be provided for library classes.
Each transportable class requires an associated TransportDescriptor.
Associating a TransportDescriptor with a class can be
done in two ways:
TransportDescriptor named
TRANSPORT_DESCRIPTOR. uka.transport.descriptors. The sub-package must
correspond to the full package of the class. The name of the
transport descriptor class must be the name of the original class
with the postfix "Adapter" appended. The default way to declare a class transportable is to implement
the Transportable interface and a special constructor with
the same signature as the method {#unmarshalReference}. The
corresponding transport descriptor can then simply forward calls to
the appropriate methods of the object.
Note: The JavaParty compiler does automatically make classes transportable. When compiling your source files with JavaParty, it should not be necessary to deal with transport related methods and interfaces.
deepClone(java.lang.Object, int, uka.transport.DeepClone)
method. See DeepClone for details.
| Field Summary |
| Fields inherited from interface uka.transport.TransportConstants |
REQUEST_MAX, REQUEST_MAX_boolean, REQUEST_MAX_byte, REQUEST_MAX_char, REQUEST_MAX_double, REQUEST_MAX_float, REQUEST_MAX_int, REQUEST_MAX_long, REQUEST_MAX_short, SIZEOF_boolean, SIZEOF_byte, SIZEOF_char, SIZEOF_double, SIZEOF_float, SIZEOF_int, SIZEOF_long, SIZEOF_short, TC_ANONYMOUS, TC_DEFAULT, TC_EXCEPTION, TC_NEW, TC_NULL, TC_REFERENCE, TC_REPLACEMENT, TC_RESET, TC_RESETTYPE, TC_TYPE, TC_USER |
| Constructor Summary | |
TransportDescriptor()
|
|
| Method Summary | |
abstract java.lang.Object |
deepClone(java.lang.Object obj,
int id,
DeepClone helper)
Creates a deep clone of the given object. |
boolean |
deepCloneReferences(java.lang.Object orig,
java.lang.Object copy,
DeepClone helper)
|
abstract java.lang.Class |
getType()
Return the class, this transport descriptor is associated with. |
void |
marshal(java.lang.Object obj,
MarshalStream s)
Marshals all non-final fields of the given object to the stream. |
void |
marshalReference(java.lang.Object obj,
MarshalStream s)
Marshals all final fields of the given object to the stream. |
void |
restoreAfterUnmarshal(java.lang.Object obj)
|
boolean |
unmarshal(java.lang.Object obj,
UnmarshalStream s)
Unmarshals all non-final fields of the given object. |
abstract java.lang.Object |
unmarshalReference(UnmarshalStream s,
int id)
Calls the unmarshaling constructor of the associated class and returns the newly created object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransportDescriptor()
| Method Detail |
public abstract java.lang.Object unmarshalReference(UnmarshalStream s,
int id)
throws java.lang.ClassNotFoundException,
java.io.IOException
UnmarshalStream.register(java.lang.Object, int) the created object with
the stream under the given id, and read all final
fields from the stream.
java.lang.ClassNotFoundException
java.io.IOException
public boolean unmarshal(java.lang.Object obj,
UnmarshalStream s)
throws java.lang.ClassNotFoundException,
java.io.IOException
unmarshalReference(uka.transport.UnmarshalStream, int)
method.
java.lang.ClassNotFoundException
java.io.IOExceptionTransportable.unmarshal(uka.transport.UnmarshalStream)
public void marshalReference(java.lang.Object obj,
MarshalStream s)
throws java.io.IOException
java.io.IOExceptionTransportable.marshalReference(uka.transport.MarshalStream)
public void marshal(java.lang.Object obj,
MarshalStream s)
throws java.io.IOException
java.io.IOExceptionTransportable.marshal(uka.transport.MarshalStream)
public abstract java.lang.Object deepClone(java.lang.Object obj,
int id,
DeepClone helper)
throws java.lang.CloneNotSupportedException
MarshalStream/UnmarshalStream pair.
java.lang.CloneNotSupportedException
public boolean deepCloneReferences(java.lang.Object orig,
java.lang.Object copy,
DeepClone helper)
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public void restoreAfterUnmarshal(java.lang.Object obj)
throws java.lang.ClassNotFoundException,
java.io.IOException
java.lang.ClassNotFoundException
java.io.IOExceptionpublic abstract java.lang.Class getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||