本文整理汇总了Java中org.omg.PortableServer.POA.the_parent方法的典型用法代码示例。如果您正苦于以下问题:Java POA.the_parent方法的具体用法?Java POA.the_parent怎么用?Java POA.the_parent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.PortableServer.POA
的用法示例。
在下文中一共展示了POA.the_parent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RefTemplate
import org.omg.PortableServer.POA; //导入方法依赖的package包/类
RefTemplate()
{
// The adapter name is computed once.
ArrayList names = new ArrayList();
names.add(the_name());
POA poa = the_parent();
while (poa != null)
{
names.add(poa.the_name());
poa = poa.the_parent();
}
// Fill in the string array in reverse (more natural) order,
// root POA first.
m_adapter_name = new String[names.size()];
for (int i = 0; i < m_adapter_name.length; i++)
m_adapter_name[i] = (String) names.get(m_adapter_name.length - i - 1);
}
示例2: id
import org.omg.PortableServer.POA; //导入方法依赖的package包/类
/**
* Get the unique Id of the POA in the process in which it is created.
* This Id is needed by portable interceptors. The id is unique
* for the life span of the POA in the process. For persistent
* POAs, if a POA is created in the same path with the same name as
* another POA, these POAs are identical have the same id. All transient
* POAs are assumed unique.
*/
public byte[] id()
{
if (m_poa_id != null)
return m_poa_id;
else
{
BufferedCdrOutput buffer = new BufferedCdrOutput();
POA p = this;
while (p != null)
{
buffer.write_string(p.the_name());
p = p.the_parent();
}
m_poa_id = buffer.buffer.toByteArray();
return m_poa_id;
}
}