Methods Summary |
---|
public synchronized void | addPoaManager(org.omg.PortableServer.POAManager manager)
poaManagers.add(manager);
|
public com.sun.corba.se.spi.oa.ObjectAdapter | find(com.sun.corba.se.spi.ior.ObjectAdapterId oaid)
POA poa=null;
try {
boolean first = true ;
Iterator iter = oaid.iterator() ;
poa = getRootPOA();
while (iter.hasNext()) {
String name = (String)(iter.next()) ;
if (first) {
if (!name.equals( ORBConstants.ROOT_POA_NAME ))
throw wrapper.makeFactoryNotPoa( name ) ;
first = false ;
} else {
poa = poa.find_POA( name, true ) ;
}
}
} catch ( org.omg.PortableServer.POAPackage.AdapterNonExistent ex ){
throw omgWrapper.noObjectAdaptor( ex ) ;
} catch ( OBJECT_NOT_EXIST ex ) {
throw ex;
} catch ( TRANSIENT ex ) {
throw ex;
} catch ( Exception ex ) {
throw wrapper.poaLookupError( ex ) ;
}
if ( poa == null )
throw wrapper.poaLookupError() ;
return (ObjectAdapter)poa;
|
public org.omg.PortableServer.portable.Delegate | getDelegateImpl()
return delegateImpl ;
|
public com.sun.corba.se.spi.orb.ORB | getORB()
return orb ;
|
public synchronized org.omg.PortableServer.POA | getRootPOA()
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
|
public com.sun.corba.se.impl.logging.POASystemException | getWrapper()
return wrapper ;
|
public void | init(com.sun.corba.se.spi.orb.ORB orb)
this.orb = orb ;
wrapper = POASystemException.get( orb,
CORBALogDomains.OA_LIFECYCLE ) ;
omgWrapper = OMGSystemException.get( orb,
CORBALogDomains.OA_LIFECYCLE ) ;
delegateImpl = new DelegateImpl( orb, this ) ;
registerRootPOA() ;
POACurrent poaCurrent = new POACurrent(orb);
orb.getLocalResolver().register( ORBConstants.POA_CURRENT_NAME,
ClosureFactory.makeConstant( poaCurrent ) ) ;
|
public synchronized org.omg.PortableServer.POA | lookupPOA(org.omg.PortableServer.Servant servant)
return (POA)exportedServantsToPOA.get(servant);
|
public synchronized int | newPOAId()
return poaId++ ;
|
public synchronized int | newPOAManagerId()
return poaManagerId++ ;
|
public synchronized void | registerPOAForServant(org.omg.PortableServer.POA poa, org.omg.PortableServer.Servant servant)
exportedServantsToPOA.put(servant, poa);
|
public void | registerRootPOA()
// We delay the evaluation of makeRootPOA until
// a call to resolve_initial_references( "RootPOA" ).
// The Future guarantees that makeRootPOA is only called once.
Closure rpClosure = new Closure() {
public Object evaluate() {
return POAImpl.makeRootPOA( orb ) ;
}
} ;
orb.getLocalResolver().register( ORBConstants.ROOT_POA_NAME,
ClosureFactory.makeFuture( rpClosure ) ) ;
|
public synchronized void | removePoaManager(org.omg.PortableServer.POAManager manager)
poaManagers.remove(manager);
|
public void | shutdown(boolean waitForCompletion)
// It is important to copy the list of POAManagers first because
// pm.deactivate removes itself from poaManagers!
Iterator managers = null ;
synchronized (this) {
isShuttingDown = true ;
managers = (new HashSet(poaManagers)).iterator();
}
while ( managers.hasNext() ) {
try {
((POAManager)managers.next()).deactivate(true, waitForCompletion);
} catch ( org.omg.PortableServer.POAManagerPackage.AdapterInactive e ) {}
}
|
public synchronized void | unregisterPOAForServant(org.omg.PortableServer.POA poa, org.omg.PortableServer.Servant servant)
exportedServantsToPOA.remove(servant);
|