|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.carol.util.delegate.UtilDelegateImpl
This class smoothes out incompatibilities between JDKs provided by different vendors.
Constructor Summary | |
UtilDelegateImpl()
Default constructor. Build a proxied object which is map to the JVM implementation of UtilDelegate interface. |
Method Summary | |
java.lang.Object |
copyObject(java.lang.Object obj,
org.omg.CORBA.ORB orb)
Copies or connects an object. |
java.lang.Object[] |
copyObjects(java.lang.Object[] objs,
org.omg.CORBA.ORB orb)
Copies or connects an array of objects. |
javax.rmi.CORBA.ValueHandler |
createValueHandler()
Returns a singleton instance of a class that implements the interface. |
java.lang.String |
getCodebase(java.lang.Class clz)
Returns the codebase, if any, for the given class. |
javax.rmi.CORBA.Tie |
getTie(java.rmi.Remote target)
Returns the tie (if any) for a given target object. |
boolean |
isLocal(javax.rmi.CORBA.Stub stub)
The _is_local() method is provided so that stubs may determine if a particular object is implemented by a local servant and hence local invocation APIs may be used. |
java.lang.Class |
loadClass(java.lang.String className,
java.lang.String remoteCodebase,
java.lang.ClassLoader loader)
Returns a class instance for the specified class. |
java.rmi.RemoteException |
mapSystemException(org.omg.CORBA.SystemException ex)
Maps a SystemException to a RemoteException. |
java.lang.Object |
readAny(org.omg.CORBA.portable.InputStream in)
Reads a java.lang.Object as a CORBA any. |
void |
registerTarget(javax.rmi.CORBA.Tie tie,
java.rmi.Remote target)
Registers a target for a tie. |
void |
unexportObject(java.rmi.Remote target)
Removes the associated tie from an internal table and calls Tie.deactivate() to deactivate the object. |
java.rmi.RemoteException |
wrapException(java.lang.Throwable orig)
Wraps an exception thrown by an implementation method. |
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. |
void |
writeAny(org.omg.CORBA.portable.OutputStream out,
java.lang.Object obj)
Writes any java.lang.Object as a CORBA any. |
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 |
Constructor Detail |
public UtilDelegateImpl()
Method Detail |
public java.lang.Object copyObject(java.lang.Object obj, org.omg.CORBA.ORB orb) throws java.rmi.RemoteException
copyObject
in interface javax.rmi.CORBA.UtilDelegate
obj
- the object to copy.orb
- the ORB.
java.rmi.RemoteException
- if the object could not be copied or
connected.public java.lang.Object[] copyObjects(java.lang.Object[] objs, org.omg.CORBA.ORB orb) throws java.rmi.RemoteException
copyObjects
in interface javax.rmi.CORBA.UtilDelegate
objs
- the objects to copy or connect.orb
- the ORB.
java.rmi.RemoteException
- if any object could not be copied or
connected.public javax.rmi.CORBA.ValueHandler createValueHandler()
createValueHandler
in interface javax.rmi.CORBA.UtilDelegate
public java.lang.String getCodebase(java.lang.Class clz)
getCodebase
in interface javax.rmi.CORBA.UtilDelegate
clz
- the class to get a codebase for.
public javax.rmi.CORBA.Tie getTie(java.rmi.Remote target)
getTie
in interface javax.rmi.CORBA.UtilDelegate
target
- the given target from which we want the tie
public boolean isLocal(javax.rmi.CORBA.Stub stub) throws java.rmi.RemoteException
isLocal
in interface javax.rmi.CORBA.UtilDelegate
stub
- the stub to test.
java.rmi.RemoteException
- The Java to IDL specification does not specify
the conditions that cause a RemoteException to be
thrown.public java.lang.Class loadClass(java.lang.String className, java.lang.String remoteCodebase, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException
Util#loadClass(String,String,ClassLoader)
that
eliminates an incompatibility between Sun's and IBM's interpretation of
Section 1.4.6 Locating Stubs and Ties of Java to IDL
Language Mapping, v1.3.
loadClass
in interface javax.rmi.CORBA.UtilDelegate
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.
Class
object representing the loaded class.
java.lang.ClassNotFoundException
- if class cannot be loaded.public java.rmi.RemoteException mapSystemException(org.omg.CORBA.SystemException ex)
mapSystemException
in interface javax.rmi.CORBA.UtilDelegate
ex
- the SystemException to map.
public java.lang.Object readAny(org.omg.CORBA.portable.InputStream in)
readAny
in interface javax.rmi.CORBA.UtilDelegate
in
- the stream from which to read the any.
public void registerTarget(javax.rmi.CORBA.Tie tie, java.rmi.Remote target)
Tie.setTarget(java.rmi.Remote)
on the tie object.
registerTarget
in interface javax.rmi.CORBA.UtilDelegate
tie
- the tie to register.target
- the target for the tie.public void unexportObject(java.rmi.Remote target) throws java.rmi.NoSuchObjectException
Tie.deactivate()
to deactivate the object.
unexportObject
in interface javax.rmi.CORBA.UtilDelegate
target
- the object to unexport.
java.rmi.NoSuchObjectException
- if the object cannot be unexportedpublic java.rmi.RemoteException wrapException(java.lang.Throwable orig)
wrapException
in interface javax.rmi.CORBA.UtilDelegate
orig
- the exception to wrap.
public 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)
.
writeAbstractObject
in interface javax.rmi.CORBA.UtilDelegate
out
- the stream in which to write the object.obj
- the object to write.public void writeAny(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
writeAny
in interface javax.rmi.CORBA.UtilDelegate
out
- the stream in which to write the any.obj
- the object to write as an any.public 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)
.
writeRemoteObject
in interface javax.rmi.CORBA.UtilDelegate
out
- the stream in which to write the object.obj
- the object to write.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |