当前位置: 首页>>代码示例>>Java>>正文


Java ServantObject类代码示例

本文整理汇总了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 ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:FullServantCacheLocalCRDImpl.java

示例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 ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:LocalClientRequestDispatcherBase.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:JIDLLocalCRDImpl.java

示例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;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:JIDLLocalCRDImpl.java

示例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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:NotLocalLocalCRDImpl.java

示例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() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:FullServantCacheLocalCRDImpl.java

示例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 ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:InfoOnlyServantCacheLocalCRDImpl.java

示例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 ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:MinimalServantCacheLocalCRDImpl.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:CorbaClientDelegateImpl.java


注:本文中的org.omg.CORBA.portable.ServantObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。