|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javax.rmi.CORBA.Util
This class provides some utility methods to manage RMI objects and mechanisms over GIOP.
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static Object |
copyObject(Object obj,
ORB orb)
This method is used by local stubs to copy an actual parameter, result object or exception. |
static Object[] |
copyObjects(Object[] obj,
ORB orb)
This method do the same as above on multiple objects,preserving sharing among these objects. |
static ValueHandler |
createValueHandler()
This method returns a singleton instance of a class that implements the ValueHandler interface. |
static String |
getCodebase(Class clz)
This method returns the codebase for the Class object clz as a space-separated list of URLs. |
static Tie |
getTie(Remote target)
This method returns the Tie object for an implementation object target, or null if no Tie is registered for the target object. |
static boolean |
isLocal(Stub s)
This method has the same semantics as the ObjectImpl._is_local method, except that it can throw a RemoteException. |
static Class |
loadClass(String name,
String code_base,
ClassLoader context)
This method loads a java class of the provided name, using additional information passed in the code_base and context parameters. |
static RemoteException |
mapSystemException(SystemException ex)
This method maps a CORBA system exception to a RemoteException |
static Object |
readAny(InputStream in)
This method reads a GIOP any from the input stream in and unmarshals it as a java object. |
static void |
registerTarget(Tie tie,
Remote target)
This method is needed to support unexportObject, because it takes a target implementation object as its parameter, it is necessary for the Util class to maintain a table mapping target objects back to their associated Ties. |
static void |
unexportObject(Remote target)
This method deactivates an implementation object and remove its associated Tie from the table maintained by the Util class. |
static RemoteException |
wrapException(Throwable obj)
The wrapException method wraps an exception thrown by an implementation method. |
static void |
writeAbstractObject(OutputStream out,
Object obj)
This method is another similar utility method for used by stubs. |
static void |
writeAny(OutputStream out,
Object obj)
This method writes the java object obj to the output stream out in the form of a CORBA any. |
static void |
writeRemoteObject(OutputStream out,
Object obj)
This method is an utility method for use by stubs when writing an RMI/IDL object reference to an output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Util()
| Method Detail |
public static RemoteException mapSystemException(SystemException ex)
ex - a CORBA system exception.
public static void writeAny(OutputStream out,
Object obj)
out - a CORBA output stream;obj - a java object.public static Object readAny(InputStream in)
in - a CORBA input stream.
public static void writeRemoteObject(OutputStream out,
Object obj)
out - a CORBA output stream;obj - an RMI/IDL object reference.
public static void writeAbstractObject(OutputStream out,
Object obj)
out - a CORBA output stream;obj - an RMI/IDL abstract object.
public static void registerTarget(Tie tie,
Remote target)
tie - an RMI/IDL skeleton.target - an RMI/IDL server implementation.public static void unexportObject(Remote target)
target - an RMI/IDL server implementation.public static Tie getTie(Remote target)
target - an RMI/IDL server implementation.public static ValueHandler createValueHandler()
public static RemoteException wrapException(Throwable obj)
obj - an exception thrown by an implementation method.
public static Object copyObject(Object obj,
ORB orb)
throws RemoteException
obj - a parameter;orb - a CORBA ORB;RemoteException - if something goes wrong.
public static Object[] copyObjects(Object[] obj,
ORB orb)
throws RemoteException
obj - an array of Java objects.orb - a CORBA ORB.RemoteException - if something goes wrong.
public static boolean isLocal(Stub s)
throws RemoteException
s - a stub;RemoteException - if something goes wrong.public static String getCodebase(Class clz)
clz - a Class object.
public static Class loadClass(String name,
String code_base,
ClassLoader context)
throws ClassNotFoundException
name - the name of the class to load;code_base - a code base indication;context - a class loader indication;ClassNotFoundException - if the class could not be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||