本文整理汇总了Java中com.sun.corba.se.impl.oa.poa.Policies类的典型用法代码示例。如果您正苦于以下问题:Java Policies类的具体用法?Java Policies怎么用?Java Policies使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Policies类属于com.sun.corba.se.impl.oa.poa包,在下文中一共展示了Policies类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TOAImpl
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
public TOAImpl( ORB orb, TransientObjectManager tom, String codebase )
{
super( orb ) ;
servants = tom ;
// Make the object key template
int serverid = ((ORB)getORB()).getTransientServerId();
int scid = ORBConstants.TOA_SCID ;
ObjectKeyTemplate oktemp = new JIDLObjectKeyTemplate( orb, scid, serverid ) ;
// REVISIT - POA specific
Policies policies = Policies.defaultPolicies;
// REVISIT - absorb codebase into a policy
initializeTemplate( oktemp, true,
policies,
codebase,
null, // manager id
oktemp.getObjectAdapterId()
) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:TOAImpl.java
示例2: initializeTemplate
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
final public void initializeTemplate( ObjectKeyTemplate oktemp,
boolean notifyORB, Policies policies, String codebase,
String objectAdapterManagerId, ObjectAdapterId objectAdapterId)
{
adapterId = oktemp.getAdapterId() ;
iortemp = IORFactories.makeIORTemplate(oktemp) ;
// This calls acceptors which create profiles and may
// add tagged components to those profiles.
orb.getCorbaTransportManager().addToIORTemplate(
iortemp, policies,
codebase, objectAdapterManagerId, objectAdapterId);
adapterTemplate = IORFactories.makeObjectReferenceTemplate( orb,
iortemp ) ;
currentFactory = adapterTemplate ;
if (notifyORB) {
PIHandler pih = orb.getPIHandler() ;
if (pih != null)
// This runs the IORInterceptors.
pih.objectAdapterCreated( this ) ;
}
iortemp.makeImmutable() ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ObjectAdapterBase.java
示例3: addToIORTemplate
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate,
Policies policies,
String codebase,
String objectAdapterManagerId,
ObjectAdapterId objectAdapterId)
{
Iterator iterator =
getAcceptors(objectAdapterManagerId, objectAdapterId).iterator();
while (iterator.hasNext()) {
CorbaAcceptor acceptor = (CorbaAcceptor) iterator.next();
acceptor.addToIORTemplate(iorTemplate, policies, codebase);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:CorbaTransportManagerImpl.java
示例4: addToIORTemplate
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate, Policies policies,
String codebase);
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:3,代码来源:CorbaAcceptor.java
示例5: addToIORTemplate
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate,
Policies policies,
String codebase,
String objectAdapterManagerId,
ObjectAdapterId objectAdapterId);
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:CorbaTransportManager.java
示例6: addToIORTemplate
import com.sun.corba.se.impl.oa.poa.Policies; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate,
Policies policies,
String codebase)
{
Iterator iterator = iorTemplate.iteratorById(
org.omg.IOP.TAG_INTERNET_IOP.value);
String hostname = orb.getORBData().getORBServerHost();
if (iterator.hasNext()) {
// REVISIT - how does this play with legacy ORBD port exchange?
IIOPAddress iiopAddress =
IIOPFactories.makeIIOPAddress(orb, hostname, port);
AlternateIIOPAddressComponent iiopAddressComponent =
IIOPFactories.makeAlternateIIOPAddressComponent(iiopAddress);
while (iterator.hasNext()) {
TaggedProfileTemplate taggedProfileTemplate =
(TaggedProfileTemplate) iterator.next();
taggedProfileTemplate.add(iiopAddressComponent);
}
} else {
GIOPVersion version = orb.getORBData().getGIOPVersion();
int templatePort;
if (policies.forceZeroPort()) {
templatePort = 0;
} else if (policies.isTransient()) {
templatePort = port;
} else {
templatePort = orb.getLegacyServerSocketManager()
.legacyGetPersistentServerPort(SocketInfo.IIOP_CLEAR_TEXT);
}
IIOPAddress addr =
IIOPFactories.makeIIOPAddress(orb, hostname, templatePort);
IIOPProfileTemplate iiopProfile =
IIOPFactories.makeIIOPProfileTemplate(orb, version, addr);
if (version.supportsIORIIOPProfileComponents()) {
iiopProfile.add(IIOPFactories.makeCodeSetsComponent(orb));
iiopProfile.add(IIOPFactories.makeMaxStreamFormatVersionComponent());
RequestPartitioningPolicy rpPolicy = (RequestPartitioningPolicy)
policies.get_effective_policy(
ORBConstants.REQUEST_PARTITIONING_POLICY);
if (rpPolicy != null) {
iiopProfile.add(
IIOPFactories.makeRequestPartitioningComponent(
rpPolicy.getValue()));
}
if (codebase != null && codebase != "") {
iiopProfile.add(IIOPFactories. makeJavaCodebaseComponent(codebase));
}
if (orb.getORBData().isJavaSerializationEnabled()) {
iiopProfile.add(
IIOPFactories.makeJavaSerializationComponent());
}
}
iorTemplate.add(iiopProfile);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:59,代码来源:SocketOrChannelAcceptorImpl.java
注:本文中的com.sun.corba.se.impl.oa.poa.Policies类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论