|
Novell exteNd Messaging Platform 5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rmi.CORBA.Util
The javax.rmi.CORBA.Util
provides methods that can be
used by the stubs to perform common operations.
Method Summary | |
static Object |
copyObject(Object obj,
ORB orb)
The copyObject method is used by local stubs to copy an actual parameter, result object, or exception. |
static Object[] |
copyObjects(Object[] objs,
ORB orb)
The copyObjects method is used by local stubs to copy any number of actual parameters, preserving sharing across parameters as necessary to support RMI/IDL semantics. |
static ValueHandler |
createValueHandler()
The createValueHandler method returns a singleton instance of a class that implements the ValueHandler interface. |
static String |
getCodebase(Class clz)
The getCodebase method returns the Java codebase for the Class object clz as a space-separated list of URLs. |
static Tie |
getTie(Remote target)
Get a Tie for the given Remote object implementation. |
static boolean |
isLocal(Stub stub)
The isLocal method has the same semantics as the ObjectImpl._is_local method, except that it can throw
a RemoteException. |
static Class |
loadClass(String className,
String remoteCodebase,
ClassLoader loader)
The loadClass method loads a Java class object for the Java class name className, using additional information passed in the remoteCodebase and loadingContext parameters. |
static RemoteException |
mapSystemException(SystemException sex)
Map a CORBA SystemException to a java.rmi.RemoteException
or a java.lang.RuntimeException . |
static Object |
readAny(InputStream is)
Read a CORBA any as a Java object. |
static void |
registerTarget(Tie tie,
Remote target)
The registerTarget method is needed to support unexportObject. |
static void |
unexportObject(Remote target)
The unexportObject method deactivates an implementation object and removes its associated Tie from the table maintained by the Util class. |
static RemoteException |
wrapException(Throwable ex)
The wrapException method wraps an exception thrown by an implementation method. |
static void |
writeAbstractObject(OutputStream os,
Object obj)
Utility method for use by stubs when writing a RMI/IDL object reference to an output stream. |
static void |
writeAny(OutputStream os,
Object obj)
Write a Java Object as a CORBA Any. |
static void |
writeRemoteObject(OutputStream out,
Object obj)
Utility method for use by stubswhen writing a RMI/IDL object reference to an output stream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static RemoteException mapSystemException(SystemException sex)
java.rmi.RemoteException
or a java.lang.RuntimeException
. If the mapped exception
is an instance of java.rmi.RemoteException
or a subclass,
the mapped exception is returned; otherwise, it is thrown.
public static RemoteException wrapException(Throwable ex)
public static void writeAny(OutputStream os, Object obj)
public static Object readAny(InputStream is)
public static void writeRemoteObject(OutputStream out, Object obj)
public static void writeAbstractObject(OutputStream os, Object obj)
out.write_abstract_interface
. However, if obj is an
exported RMI/IDL implementation object, then writeAbstractObject
allocates (or reuses) a suitable Tie, plugs together the tie with obj,
and writes the object reference for the tie to the
out.write_abstract_interface
.
public static void registerTarget(Tie tie, Remote target)
It is the responsibility of the code that allocates a Tie to also call the registerTarget method to notify the Util class of the target object for a given tie. The registerTarget method will call the Tie.setTarget method to notify the tie object of its target object.
public static void unexportObject(Remote target)
public static Tie getTie(Remote target)
public static ValueHandler createValueHandler()
public static boolean isLocal(Stub stub) throws RemoteException
ObjectImpl._is_local
method, except that it can throw
a RemoteException.
RemoteException
ObjectImpl._is_local()
public static Object copyObject(Object obj, ORB orb) throws RemoteException
RemoteException
copyObjects(java.lang.Object[], org.omg.CORBA.ORB)
public static Object[] copyObjects(Object[] objs, ORB orb) throws RemoteException
The copyObject and copyObjects methods ensure that remote call semantics are observed for local calls. They observe copy semantics for value objects that are equivalent to marshaling, and they handle remote objects correctly. Stubs must either call these methods or generate inline code to provide equivalent semantics.
RemoteException
copyObject(java.lang.Object, org.omg.CORBA.ORB)
public static String getCodebase(Class clz)
public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException
ClassNotFoundException
|
Novell exteNd Messaging Platform 5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |