org.openorb.rmi.system
Class RMIObjectStreamClass

java.lang.Object
  |
  +--org.openorb.rmi.system.RMIObjectStreamClass

public class RMIObjectStreamClass
extends java.lang.Object

This is a default implementation for a Remote interface

Author:
Jerome Daniel, Michael Rumpf

Method Summary
 java.lang.Class forClass()
          Return the class in the local VM that this version is mapped to.
 RMIObjectStreamClass[] getAllStreamClasses()
          Return the stream classes for the parent classes.
 java.lang.Class getBaseClass()
          Return base class.
 java.lang.String getName()
          The name of the class described by this descriptor.
 java.io.ObjectStreamClass getObjectStreamClass()
          Return the object stream class.
 java.lang.String getRepoID()
          Return repository ID string.
 long getRepoIDHash()
          Returns the hashed repository ID value, as specified in the corba spec 10.6.2.
 long getSerialVersionUID()
          Return the serialVersionUID for this class.
 boolean hasReadObject()
          True if the target has the writeObject method.
 boolean hasWriteObject()
          True if the target has the writeObject method.
 boolean isCustomMarshaled()
          True if the class is custom marshaled.
 boolean isExternalizable()
          True if the class is externalizable.
 boolean isIDLEntity()
          True if the class is a boxed IDL entity.
static RMIObjectStreamClass lookup(java.lang.Class clz)
          Try to get the corresponding RMIObjectStreamClass from an internal hash map.
static org.omg.CORBA.TypeCode lookupTypeCode(java.lang.Class clz)
          Create typecode from runtime class.
 java.lang.String toString()
          Return a string describing this ObjectStreamClass.
 org.omg.CORBA.TypeCode type()
          Return the typecode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

lookup

public static RMIObjectStreamClass lookup(java.lang.Class clz)
                                   throws java.io.InvalidClassException
Try to get the corresponding RMIObjectStreamClass from an internal hash map. This method also checks whether the class is serializable at all. This check fails if the class is not derived from Serializable or if it's on of the following types: org.omg.CORBA.Object, org.omg.CORBA.portable.ValueBase, or java.rmi.Remote.
Parameters:
clz - The class for which to get the corresponding RMIObjectStreamClass for.
Returns:
The RMIObjectStreamClass from the internal hash map if an entry was found or a new instance.

lookupTypeCode

public static org.omg.CORBA.TypeCode lookupTypeCode(java.lang.Class clz)
                                             throws java.io.InvalidClassException
Create typecode from runtime class. This will only successfully return typecodes for types which can be marshalled.
Returns:
the target object's typecode, or null if the target object is not serializable.

getRepoIDHash

public long getRepoIDHash()
Returns the hashed repository ID value, as specified in the corba spec 10.6.2.

getRepoID

public java.lang.String getRepoID()
Return repository ID string.

getBaseClass

public java.lang.Class getBaseClass()
Return base class.

isCustomMarshaled

public boolean isCustomMarshaled()
True if the class is custom marshaled.

isExternalizable

public boolean isExternalizable()
True if the class is externalizable.

hasWriteObject

public boolean hasWriteObject()
True if the target has the writeObject method.

hasReadObject

public boolean hasReadObject()
True if the target has the writeObject method.

isIDLEntity

public boolean isIDLEntity()
True if the class is a boxed IDL entity.

getAllStreamClasses

public RMIObjectStreamClass[] getAllStreamClasses()
Return the stream classes for the parent classes. For externalizable and IDLEntities this will return null.

forClass

public java.lang.Class forClass()
Return the class in the local VM that this version is mapped to. Null is returned if there is no corresponding local class.
Returns:
the Class instance that this descriptor represents

getName

public java.lang.String getName()
The name of the class described by this descriptor.
Returns:
a String representing the fully qualified name of the class

getSerialVersionUID

public long getSerialVersionUID()
Return the serialVersionUID for this class. The serialVersionUID defines a set of classes all with the same name that have evolved from a common root class and agree to be serialized and deserialized using a common format. NonSerializable classes have a serialVersionUID of 0L.
Returns:
the SUID of the class described by this descriptor

toString

public java.lang.String toString()
Return a string describing this ObjectStreamClass.
Overrides:
toString in class java.lang.Object

type

public org.omg.CORBA.TypeCode type()
Return the typecode.

getObjectStreamClass

public java.io.ObjectStreamClass getObjectStreamClass()
Return the object stream class.