Interface UtilDelegate
- All Known Implementing Classes:
Util
public interface UtilDelegate
Supports delegation for method implementations in
Util. The
delegate is a singleton instance of a class that implements this
interface and provides a replacement implementation for all the
methods of javax.rmi.CORBA.Util.
Delegation is enabled by providing the delegate's class name as the
value of the
javax.rmi.CORBA.UtilClass
system property.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopyObject(Object obj, ORB orb) Delegation call forUtil.copyObject(Object, ORB).Object[]copyObjects(Object[] obj, ORB orb) Delegation call forUtil.copyObjects(Object[], ORB).Delegation call forUtil.createValueHandler().getCodebase(Class clz) Delegation call forUtil.getCodebase(Class).Delegation call forUtil.getTie(Remote).booleanDelegation call forUtil.isLocal(Stub).loadClass(String className, String remoteCodebase, ClassLoader loader) Delegation call forUtil.loadClass(String, String, ClassLoader).Delegation call forUtil.mapSystemException(SystemException).readAny(InputStream in) Delegation call forUtil.readAny(InputStream).voidregisterTarget(Tie tie, Remote target) Delegation call forUtil.registerTarget(Tie, Remote).voidunexportObject(Remote target) Delegation call forUtil.unexportObject(Remote).wrapException(Throwable obj) Delegation call forUtil.wrapException(Throwable).voidwriteAbstractObject(OutputStream out, Object obj) Delegation call forUtil.writeAbstractObject(OutputStream, Object).voidwriteAny(OutputStream out, Object obj) Delegation call forUtil.writeAny(OutputStream, Object).voidwriteRemoteObject(OutputStream out, Object obj) Delegation call forUtil.writeRemoteObject(OutputStream, Object).
-
Method Details
-
mapSystemException
Delegation call forUtil.mapSystemException(SystemException).- Parameters:
ex- the SystemException to map.- Returns:
- the mapped exception.
-
writeAny
Delegation call forUtil.writeAny(OutputStream, Object).- Parameters:
out- the stream in which to write the any.obj- the object to write as an any.
-
readAny
Delegation call forUtil.readAny(InputStream).- Parameters:
in- the stream from which to read the any.- Returns:
- the object read from the stream.
-
writeRemoteObject
Delegation call forUtil.writeRemoteObject(OutputStream, Object).- Parameters:
out- the stream in which to write the object.obj- the object to write.
-
writeAbstractObject
Delegation call forUtil.writeAbstractObject(OutputStream, Object).- Parameters:
out- the stream in which to write the object.obj- the object to write.
-
registerTarget
Delegation call forUtil.registerTarget(Tie, Remote).- Parameters:
tie- tie to registertarget- target for the tie
-
unexportObject
Delegation call forUtil.unexportObject(Remote).- Parameters:
target- the object to unexport- Throws:
NoSuchObjectException- if the target object does not exist
-
getTie
Delegation call forUtil.getTie(Remote).- Parameters:
target- the object to get the tie for- Returns:
- the tie or null if no tie is registered for the given target.
-
createValueHandler
ValueHandler createValueHandler()Delegation call forUtil.createValueHandler().- Returns:
- a class which implements the ValueHandler interface.
-
getCodebase
Delegation call forUtil.getCodebase(Class).- Parameters:
clz- the class to get a codebase for.- Returns:
- a space-separated list of URLs, or null.
-
loadClass
Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException Delegation call forUtil.loadClass(String, String, ClassLoader).- Parameters:
className- the name of the class.remoteCodebase- a space-separated list of URLs at which the class might be found. May be null.loader- a ClassLoader that may be used to load the class if all other methods fail.- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
isLocal
Delegation call forUtil.isLocal(Stub).- Parameters:
stub- the stub to test.- Returns:
- The is_local() method returns true if the servant incarnating the object is located in the same process as the stub and they both share the same ORB instance. The is_local() method returns false otherwise. The default behaviour of is_local() is to return false.
- Throws:
RemoteException- The Java to IDL specification does not specify the conditions that cause a RemoteException to be thrown.
-
wrapException
Delegation call forUtil.wrapException(Throwable).- Parameters:
obj- the exception to wrap.- Returns:
- the wrapped exception.
-
copyObject
Delegation call forUtil.copyObject(Object, ORB).- Parameters:
obj- the object to copy or connect.orb- the ORB- Returns:
- the copied or connected object.
- Throws:
RemoteException- if the object could not be copied or connected.
-
copyObjects
Delegation call forUtil.copyObjects(Object[], ORB).- Parameters:
obj- the objects to copy or connect.orb- the ORB- Returns:
- the copied or connected objects.
- Throws:
RemoteException- if the objects could not be copied or connected.
-