本文整理汇总了Java中org.omg.PortableServer.POAPackage.AdapterNonExistent类的典型用法代码示例。如果您正苦于以下问题:Java AdapterNonExistent类的具体用法?Java AdapterNonExistent怎么用?Java AdapterNonExistent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AdapterNonExistent类属于org.omg.PortableServer.POAPackage包,在下文中一共展示了AdapterNonExistent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: find_POA
import org.omg.PortableServer.POAPackage.AdapterNonExistent; //导入依赖的package包/类
/**
* Find and optionally activate the child POA with the given name.
*
* @param poa_name the name of the POA to find.
* @param activate_it if the child with the specified name is not found
* or inactive and this parameter is true, the target POA activator is
* invoked to activate that child. If this succeeds, that child POA
* is returned.
*
* @throws AdapterNonExistent if no active child with the given name
* is found and one of the following is true:
* a) the target POA has no associated
* {@link AdapterActivator}. b) that activator fails to activate the
* child POA. c) <code>activate_id</code> = false.
*/
public POA find_POA(String poa_name, boolean activate_it)
throws AdapterNonExistent
{
POA child;
for (int i = 0; i < children.size(); i++)
{
child = (POA) children.get(i);
if (child.the_name().equals(poa_name))
return child;
}
if (activate_it && m_activator != null)
{
boolean activated = m_activator.unknown_adapter(this, poa_name);
if (!activated)
throw new AdapterNonExistent(poa_name + " activation failed.");
// Tha activator should add the child to the childrent table.
for (int i = 0; i < children.size(); i++)
{
child = (POA) children.get(i);
if (child.the_name().equals(poa_name))
return child;
}
throw new AdapterNonExistent(poa_name + " not created. ");
}
else
throw new AdapterNonExistent(poa_name);
}
示例2: findPOA
import org.omg.PortableServer.POAPackage.AdapterNonExistent; //导入依赖的package包/类
/**
* Finds the POA which corresponds to
*
* @param request.
* If the request belongs to another POAManager it is bypassed to
* it, returning null.
* @param request
* The queued request to be executed.
* @returns POAImpl POA where the request must be executed.
* @exception org.omg.PortableServer.POAPackage.AdapterNonExistent
* If it fails finding the POA.
*/
private POAImpl findPOA( QueuedRequest request )
throws org.omg.PortableServer.POAPackage.AdapterNonExistent
{
POAImpl current_poa;
current_poa = request.getCurrentPOA();
if( current_poa == null ){
current_poa = this.m_orb.initPOA();
request.setCurrentPOA( current_poa );
}
boolean bypassed = false;
POAManagerImpl nextPOAManager;
while ( !( bypassed || request.isFinalPOA() ) ) {
current_poa = (POAImpl) current_poa.find_POA(
request.getCurrentChildPOAName(),true
);
request.nextChildPOA(current_poa);
nextPOAManager = (POAManagerImpl) current_poa.the_POAManager();
if (nextPOAManager != m_poa_manager) {
// bypass request to nextPOAManager
if (m_trace != null) {
m_trace.print(
Trace.DEEP_DEBUG,
new String[]{
toString(), " bypassing request ", request.toString(),
" to ", current_poa.toString()
}
);
}
nextPOAManager.put(request);
bypassed = true;
}
}
return ( bypassed )?null:current_poa;
}
示例3: find_POA
import org.omg.PortableServer.POAPackage.AdapterNonExistent; //导入依赖的package包/类
/**
* Find and optionally activate the child POA with the given name.
*
* @param poa_name the name of the POA to find.
* @param activate_it if the child with the specified name is not found
* or inactive and this parameter is true, the target POA activator is
* invoked to activate that child. If this succeeds, that child POA
* is returned.
*
* @throws AdapterNonExistent if no active child with the given name
* is found and one of the following is true:
* a) the target POA has no associated
* {@link AdapterActivator}. b) that activator fails to activate the
* child POA. c) <code>activate_id</code> = false.
*/
POA find_POA(String poa_name, boolean activate_it)
throws AdapterNonExistent;