本文整理汇总了Java中org.omg.CORBA.portable.ServantObject类的典型用法代码示例。如果您正苦于以下问题:Java ServantObject类的具体用法?Java ServantObject怎么用?Java ServantObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServantObject类属于org.omg.CORBA.portable包,在下文中一共展示了ServantObject类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
String operation, Class expectedType )
{
OAInvocationInfo cachedInfo = getCachedInfo() ;
if (!checkForCompatibleServant( cachedInfo, expectedType ))
return null ;
// Note that info is shared across multiple threads
// using the same subcontract, each of which may
// have its own operation. Therefore we need to clone it.
OAInvocationInfo info = new OAInvocationInfo( cachedInfo, operation ) ;
orb.pushInvocationInfo( info ) ;
try {
info.oa().enter() ;
} catch (OADestroyed pdes) {
throw wrapper.preinvokePoaDestroyed( pdes ) ;
}
return info ;
}
示例2: checkForCompatibleServant
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
/** Check that the servant in info (which must not be null) is
* an instance of the expectedType. If not, set the thread local flag
* and return false.
*/
protected boolean checkForCompatibleServant( ServantObject so,
Class expectedType )
{
if (so == null)
return false ;
// Normally, this test will never fail. However, if the servant
// and the stub were loaded in different class loaders, this test
// will fail.
if (!expectedType.isInstance( so.servant )) {
isNextCallValid.set( Boolean.FALSE ) ;
// When servant_preinvoke returns null, the stub will
// recursively re-invoke itself. Thus, the next call made from
// the stub is another useLocalInvocation call.
return false ;
}
return true ;
}
示例3: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation,
Class expectedType)
{
if (!checkForCompatibleServant( servant, expectedType ))
return null ;
return servant;
}
示例4: setServant
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public void setServant( java.lang.Object servant )
{
if (servant != null && servant instanceof Tie) {
this.servant = new ServantObject();
this.servant.servant = ((Tie)servant).getTarget();
} else {
this.servant = null;
}
}
示例5: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation,
Class expectedType)
{
// REVISIT: Rewrite rmic.HelloTest and rmic.LocalStubTest
// (which directly call servant_preinvoke)
// then revert to exception again.
return null;
//throw new INTERNAL();
}
示例6: servant_postinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public void servant_postinvoke(org.omg.CORBA.Object self,
ServantObject servantobj)
{
OAInvocationInfo cachedInfo = getCachedInfo() ;
cachedInfo.oa().exit() ;
orb.popInvocationInfo() ;
}
示例7: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
String operation, Class expectedType )
{
OAInvocationInfo cachedInfo = getCachedInfo() ;
if (!checkForCompatibleServant( cachedInfo, expectedType ))
return null ;
// Note that info is shared across multiple threads
// using the same subcontract, each of which may
// have its own operation. Therefore we need to copy it.
OAInvocationInfo info = new OAInvocationInfo(cachedInfo, operation) ;
orb.pushInvocationInfo( info ) ;
return info ;
}
示例8: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
String operation, Class expectedType )
{
OAInvocationInfo cachedInfo = getCachedInfo() ;
if (checkForCompatibleServant( cachedInfo, expectedType ))
return cachedInfo ;
else
return null ;
}
示例9: servant_preinvoke
import org.omg.CORBA.portable.ServantObject; //导入依赖的package包/类
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation,
Class expectedType)
{
return
contactInfoList.getLocalClientRequestDispatcher()
.servant_preinvoke(self, operation, expectedType);
}