Novell exteNd Messaging Platform 5.2

javax.rmi.CORBA
Interface ValueHandler


public interface ValueHandler

The interface javax.rmi.CORBA.ValueHandler defines methods which allow serialization of Java objects to and from GIOP streams.


Method Summary
 String getRMIRepositoryID(Class clz)
          The getRMIRepositoryID method returns the RMI-style repository ID string for clz.
 RunTime getRunTimeCodeBase()
          The getRunTimeCodeBase method returns the ValueHandler object's SendingContext::RunTime object reference, which is used to construct the SendingContextRunTime service context.
 boolean isCustomMarshaled(Class clz)
          The isCustomMarshaled method returns true if the value is custom marshaled and therefore requires a chunked encoding, and false otherwise.
 Serializable readValue(InputStream is, int offset, Class clz, String repositoryId, RunTime sender)
          The readValue method can be used to read GIOP data, including RMI Remote objects and serialized data objects, from an underlying portable InputStream.
 Serializable writeReplace(Serializable serializable)
          The writeReplace method returns the serialization replacement for the value object.
 void writeValue(OutputStream os, Serializable value)
          The writeValue method can be used to write GIOP data, including RMI Remote objects and serialized data objects, to an underlying portable OutputStream.
 

Method Detail

writeValue

public void writeValue(OutputStream os,
                       Serializable value)
The writeValue method can be used to write GIOP data, including RMI Remote objects and serialized data objects, to an underlying portable OutputStream.

The implementation of the writeValue method interacts with the core Java serialization machinery. The data generated during serialization is written using the underlying OutputStream object.


readValue

public Serializable readValue(InputStream is,
                              int offset,
                              Class clz,
                              String repositoryId,
                              RunTime sender)
The readValue method can be used to read GIOP data, including RMI Remote objects and serialized data objects, from an underlying portable InputStream. The offset parameter is the offset in the stream of the value being unmarshaled. The clz parameter is the Java class of the value to be unmarshaled. The repositoryID parameter is the repository ID unmarshaled from the value header by the caller of readValue. The sender parameter is the sending context object passed in the optional SendingContextRunTime service context in the GIOP header, if any, or null if no sending context was passed.

The implementation of the readValue method interacts with the core Java serialization machinery. The data required during deserialization is read using the underlying InputStream object.


getRMIRepositoryID

public String getRMIRepositoryID(Class clz)
The getRMIRepositoryID method returns the RMI-style repository ID string for clz.


isCustomMarshaled

public boolean isCustomMarshaled(Class clz)
The isCustomMarshaled method returns true if the value is custom marshaled and therefore requires a chunked encoding, and false otherwise.


getRunTimeCodeBase

public RunTime getRunTimeCodeBase()
The getRunTimeCodeBase method returns the ValueHandler object's SendingContext::RunTime object reference, which is used to construct the SendingContextRunTime service context.


writeReplace

public Serializable writeReplace(Serializable serializable)
The writeReplace method returns the serialization replacement for the value object. This is the object returned by calling value.writeReplace(), if value has a writeReplace method.


Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.