|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.rmi.CORBA.Util
Provides utility methods that can be used by stubs and ties to perform common operations.
Method Summary | |
static java.lang.Object |
copyObject(java.lang.Object obj,
org.omg.CORBA.ORB orb)
Copies or connects an object. |
static java.lang.Object[] |
copyObjects(java.lang.Object[] obj,
org.omg.CORBA.ORB orb)
Copies or connects an array of objects. |
static ValueHandler |
createValueHandler()
Returns a singleton instance of a class that implements the ValueHandler interface. |
static java.lang.String |
getCodebase(java.lang.Class clz)
Returns the codebase, if any, for the given class. |
static Tie |
getTie(java.rmi.Remote target)
Returns the tie (if any) for a given target object. |
static boolean |
isLocal(Stub stub)
Returns true if the stub is in the same ORB instance as is the servant. |
static java.lang.Class |
loadClass(java.lang.String className,
java.lang.String remoteCodebase,
java.lang.Class loadingContext)
Returns a class instance for the specified class. |
static java.rmi.RemoteException |
mapSystemException(org.omg.CORBA.SystemException ex)
Maps a SystemException to a RemoteException. |
static java.lang.Object |
readAny(org.omg.CORBA.portable.InputStream in)
Reads a java.lang.Object as a CORBA any. |
static void |
registerTarget(Tie tie,
java.rmi.Remote target)
Registers a target for a tie. |
static void |
unexportObject(java.rmi.Remote target)
Removes the associated tie from an internal table and calls Tie.deactivate()
to deactivate the object. |
static java.rmi.RemoteException |
wrapException(java.lang.Throwable orig)
Wraps an exception thrown by an implementation method. |
static void |
writeAbstractObject(org.omg.CORBA.portable.OutputStream out,
java.lang.Object obj)
Writes a java.lang.Object as either a value or a CORBA Object. |
static void |
writeAny(org.omg.CORBA.portable.OutputStream out,
java.lang.Object obj)
Writes any java.lang.Object as a CORBA any. |
static void |
writeRemoteObject(org.omg.CORBA.portable.OutputStream out,
java.lang.Object obj)
Writes a java.lang.Object as a CORBA Object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static java.rmi.RemoteException mapSystemException(org.omg.CORBA.SystemException ex)
ex
- the SystemException to map.public static void writeAny(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
out
- the stream in which to write the any.obj
- the object to write as an any.public static java.lang.Object readAny(org.omg.CORBA.portable.InputStream in)
in
- the stream from which to read the any.public static void writeRemoteObject(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
obj
is
an exported RMI-IIOP server object, the tie is found
and wired to obj
, then written to out.write_Object(org.omg.CORBA.Object)
.
If obj
is a CORBA Object, it is written to
out.write_Object(org.omg.CORBA.Object)
.out
- the stream in which to write the object.obj
- the object to write.public static void writeAbstractObject(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
obj
is a value object or a stub object, it is written to
out.write_abstract_interface(java.lang.Object)
. If obj
is an exported
RMI-IIOP server object, the tie is found and wired to obj
,
then written to out.write_abstract_interface(java.lang.Object)
.out
- the stream in which to write the object.obj
- the object to write.public static void registerTarget(Tie tie, java.rmi.Remote target)
Tie.setTarget(java.rmi.Remote)
on the tie object.tie
- the tie to register.target
- the target for the tie.public static void unexportObject(java.rmi.Remote target)
Tie.deactivate()
to deactivate the object.target
- the object to unexport.public static Tie getTie(java.rmi.Remote target)
public static ValueHandler createValueHandler()
ValueHandler
interface.public static java.lang.String getCodebase(java.lang.Class clz)
clz
- the class to get a codebase for.public static java.lang.Class loadClass(java.lang.String className, java.lang.String remoteCodebase, java.lang.Class loadingContext) throws java.lang.ClassNotFoundException
className
- the name of the class.remoteCodebase
- a space-separated list of URLs at which
the class might be found. May be null.loadingContext
- a class whose ClassLoader may be used to
load the class if all other methods fail.Class
object representing the loaded class.public static boolean isLocal(Stub stub) throws java.rmi.RemoteException
ObjectImpl._is_local()
except that it throws a RemoteException instead of a SystemException.stub
- the stub to test.public static java.rmi.RemoteException wrapException(java.lang.Throwable orig)
orig
- the exception to wrap.public static java.lang.Object[] copyObjects(java.lang.Object[] obj, org.omg.CORBA.ORB orb) throws java.rmi.RemoteException
obj
- the objects to copy or connect.orb
- the ORB.public static java.lang.Object copyObject(java.lang.Object obj, org.omg.CORBA.ORB orb) throws java.rmi.RemoteException
obj
- the object to copy.orb
- the ORB.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |