gnu.javax.rmi.CORBA

Class RmiUtilities

Known Direct Subclasses:
UtilDelegateImpl, ValueHandlerDelegateImpl

public class RmiUtilities
extends Object

Defines methods that must be accessible in several derived classes.

Field Summary

static String
RMI_CLASS_ID
The standard Class repository Id.
static String
RMI_STRING_ARRAY_ID
The standard string array repository Id.
static String
RMI_STRING_ID
The standard String repository Id.
static byte
VERSION
The currently used RMI-IIOP version format.

Method Summary

static long
getHashCode(Class<T> c)
Get the persistent hash code for the given class, as defined by OMG standard.
static Field[]
getWritableFields(Class<T> c)
boolean
isTieRequired(Object object)
Check if the object must be wrapped into Tie, connected to the ORB and then the corresponding Stub be written.
Serializable
readValue(InputStream in, int offset, Class<T> clz, String repositoryID, RunTime sender)
Read value from the input stream in the case when the value is not Streamable or CustomMarshalled.
static String
toHex(long l)
Converts to hexadecimal string, supplementing leading zeros.
void
writeRemoteObject(OutputStream an_output, Object object)
Write data to the CORBA output stream.
void
writeValue(OutputStream an_output, Serializable object)
Write data to the CORBA output stream.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

RMI_CLASS_ID

public static final String RMI_CLASS_ID
The standard Class repository Id.
Field Value:
"RMI:javax.rmi.CORBA.ClassDesc:2BABDA04587ADCCC:CFBF02CF5294176B"

RMI_STRING_ARRAY_ID

public static final String RMI_STRING_ARRAY_ID
The standard string array repository Id.
Field Value:
"RMI:[Ljava.lang.String;:071DA8BE7F971128:A0F0A4387A3BB342"

RMI_STRING_ID

public static final String RMI_STRING_ID
The standard String repository Id.

VERSION

public static byte VERSION
The currently used RMI-IIOP version format.

Method Details

getHashCode

public static long getHashCode(Class<T> c)
Get the persistent hash code for the given class, as defined by OMG standard. The inheritance, field names and types (but not the visibility) are taken into consideration as well as the presence of the writeObject method are taken into consideration. The class name and methods, if any, are not taken into consideration.

getWritableFields

public static Field[] getWritableFields(Class<T> c)

isTieRequired

public boolean isTieRequired(Object object)
Check if the object must be wrapped into Tie, connected to the ORB and then the corresponding Stub be written.

readValue

public Serializable readValue(InputStream in,
                              int offset,
                              Class<T> clz,
                              String repositoryID,
                              RunTime sender)
Read value from the input stream in the case when the value is not Streamable or CustomMarshalled.

toHex

public static String toHex(long l)
Converts to hexadecimal string, supplementing leading zeros.

writeRemoteObject

public void writeRemoteObject(OutputStream an_output,
                              Object object)
Write data to the CORBA output stream. Writes the object contents only; the header must be already written. For object, containing objects, may be called recursively.
Parameters:
an_output - a stream to write to, must be org.omg.CORBA_2_3.portable.OutputStream
object - an object to write.

writeValue

public void writeValue(OutputStream an_output,
                       Serializable object)
Write data to the CORBA output stream. Writes the object contents only; the header must be already written. For object, containing objects, may be called recursively.
Parameters:
an_output - a stream to write to, must be org.omg.CORBA_2_3.portable.OutputStream
object - an object to write.

RmiUtilities.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.