本文整理汇总了Java中com.sun.corba.se.impl.protocol.NotLocalLocalCRDImpl类的典型用法代码示例。如果您正苦于以下问题:Java NotLocalLocalCRDImpl类的具体用法?Java NotLocalLocalCRDImpl怎么用?Java NotLocalLocalCRDImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotLocalLocalCRDImpl类属于com.sun.corba.se.impl.protocol包,在下文中一共展示了NotLocalLocalCRDImpl类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setLocalSubcontract
import com.sun.corba.se.impl.protocol.NotLocalLocalCRDImpl; //导入依赖的package包/类
/**
* setLocalSubcontract sets cached information that is set whenever
* the effectiveTargetIOR changes.
*
* Note: this must be maintained accurately whether or not the ORB
* allows local optimization, because ServantManagers in the POA
* ALWAYS use local optimization ONLY (they do not have a remote case).
*/
protected void setLocalSubcontract()
{
if (!effectiveTargetIOR.getProfile().isLocal()) {
LocalClientRequestDispatcher = new NotLocalLocalCRDImpl();
return;
}
// XXX Note that this always uses the first IIOP profile to get the
// scid. What about multi-profile IORs? This should perhaps be
// tied to the current ContactInfo in some way, together with an
// implementation of ClientDelegate that generally prefers co-located
// ContactInfo. This may in fact mean that we should do this at
// the ContactInfo level, rather than the IOR/profile level.
int scid = effectiveTargetIOR.getProfile().getObjectKeyTemplate().
getSubcontractId() ;
LocalClientRequestDispatcherFactory lcsf = orb.getRequestDispatcherRegistry().getLocalClientRequestDispatcherFactory( scid ) ;
LocalClientRequestDispatcher = lcsf.create( scid, effectiveTargetIOR ) ;
}