Methods Summary |
---|
public static org.omg.CORBA.Object | activateServant(org.omg.PortableServer.Servant servant)Use implicit activation to get an object reference for the servant.
POA poa = servant._default_POA() ;
org.omg.CORBA.Object ref = null ;
try {
ref = poa.servant_to_reference( servant ) ;
} catch (ServantNotActive sna) {
throw wrapper.getDelegateServantNotActive( sna ) ;
} catch (WrongPolicy wp) {
throw wrapper.getDelegateWrongPolicy( wp ) ;
}
// Make sure that the POAManager is activated if no other
// POAManager state management has taken place.
POAManager mgr = poa.the_POAManager() ;
if (mgr instanceof POAManagerImpl) {
POAManagerImpl mgrImpl = (POAManagerImpl)mgr ;
mgrImpl.implicitActivation() ;
}
return ref ;
|
public static org.omg.CORBA.Object | activateTie(javax.rmi.CORBA.Tie tie)Given any Tie, return the corresponding object refernce, activating
the Servant if necessary.
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
|
public static void | connect(java.lang.Object stub, org.omg.CORBA.ORB orb)
if (stub instanceof DynamicStub)
((DynamicStub)stub).connect(
(com.sun.corba.se.spi.orb.ORB)orb ) ;
else if (stub instanceof javax.rmi.CORBA.Stub)
((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
else if (stub instanceof ObjectImpl)
orb.connect( (org.omg.CORBA.Object)stub ) ;
else
throw wrapper.connectRequiresStub() ;
|
public static org.omg.CORBA.portable.Delegate | getDelegate(java.lang.Object stub)This also gets the delegate from a Servant by
using Servant._this_object()
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getDelegate() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._get_delegate() ;
else if (stub instanceof Tie) {
Tie tie = (Tie)stub ;
org.omg.CORBA.Object ref = activateTie( tie ) ;
return getDelegate( ref ) ;
} else
throw wrapper.getDelegateRequiresStub() ;
|
public static org.omg.CORBA.ORB | getORB(java.lang.Object stub)
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getORB() ;
else if (stub instanceof ObjectImpl)
return (ORB)((ObjectImpl)stub)._orb() ;
else
throw wrapper.getOrbRequiresStub() ;
|
public static java.lang.String[] | getTypeIds(java.lang.Object stub)
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getTypeIds() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._ids() ;
else
throw wrapper.getTypeIdsRequiresStub() ;
|
public static boolean | isLocal(java.lang.Object stub)
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).isLocal() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._is_local() ;
else
throw wrapper.isLocalRequiresStub() ;
|
public static boolean | isStub(java.lang.Object stub)
return (stub instanceof DynamicStub) ||
(stub instanceof ObjectImpl) ;
|
public static boolean | isStubClass(java.lang.Class cls)
return (ObjectImpl.class.isAssignableFrom( cls )) ||
(DynamicStub.class.isAssignableFrom( cls )) ;
|
public static org.omg.CORBA.portable.OutputStream | request(java.lang.Object stub, java.lang.String operation, boolean responseExpected)
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).request( operation,
responseExpected ) ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._request( operation,
responseExpected ) ;
else
throw wrapper.requestRequiresStub() ;
|
public static void | setDelegate(java.lang.Object stub, org.omg.CORBA.portable.Delegate delegate)
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
|