本文整理汇总了Java中com.sun.corba.se.impl.protocol.JIDLLocalCRDImpl类的典型用法代码示例。如果您正苦于以下问题:Java JIDLLocalCRDImpl类的具体用法?Java JIDLLocalCRDImpl怎么用?Java JIDLLocalCRDImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JIDLLocalCRDImpl类属于com.sun.corba.se.impl.protocol包,在下文中一共展示了JIDLLocalCRDImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: disconnect
import com.sun.corba.se.impl.protocol.JIDLLocalCRDImpl; //导入依赖的package包/类
public void disconnect( org.omg.CORBA.Object objref )
{
// Get the delegate, then ior, then transientKey, then delete servant
org.omg.CORBA.portable.Delegate del = StubAdapter.getDelegate(
objref ) ;
CorbaContactInfoList ccil = (CorbaContactInfoList)
((ClientDelegate)del).getContactInfoList() ;
LocalClientRequestDispatcher lcs =
ccil.getLocalClientRequestDispatcher() ;
if (lcs instanceof JIDLLocalCRDImpl) {
JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
byte[] oid = jlcs.getObjectId() ;
servants.deleteServant(oid);
jlcs.unexport() ;
} else {
throw new RuntimeException(
"TOAImpl.disconnect can not be called on " + lcs ) ;
}
}
示例2: makeJIDLLocalClientRequestDispatcherFactory
import com.sun.corba.se.impl.protocol.JIDLLocalCRDImpl; //导入依赖的package包/类
public static LocalClientRequestDispatcherFactory makeJIDLLocalClientRequestDispatcherFactory( final ORB orb )
{
return new LocalClientRequestDispatcherFactory() {
public LocalClientRequestDispatcher create( int id, IOR ior ) {
return new JIDLLocalCRDImpl( orb, id, ior ) ;
}
} ;
}
示例3: connect
import com.sun.corba.se.impl.protocol.JIDLLocalCRDImpl; //导入依赖的package包/类
public void connect( org.omg.CORBA.Object objref)
{
// Store the objref and get a userkey allocated by the transient
// object manager.
byte[] key = servants.storeServant(objref, null);
// Find out the repository ID for this objref.
String id = StubAdapter.getTypeIds( objref )[0] ;
// Create the new objref
ObjectReferenceFactory orf = getCurrentFactory() ;
org.omg.CORBA.Object obj = orf.make_object( id, key ) ;
// Copy the delegate from the new objref to the argument
// XXX handle the case of an attempt to connect a local object.
org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
obj ) ;
CorbaContactInfoList ccil = (CorbaContactInfoList)
((ClientDelegate)delegate).getContactInfoList() ;
LocalClientRequestDispatcher lcs =
ccil.getLocalClientRequestDispatcher() ;
if (lcs instanceof JIDLLocalCRDImpl) {
JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
jlcs.setServant( objref ) ;
} else {
throw new RuntimeException(
"TOAImpl.connect can not be called on " + lcs ) ;
}
StubAdapter.setDelegate( objref, delegate ) ;
}