Java 类org.omg.CORBA.portable.ServantObject 实例源码

项目:OpenJSharp    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:OpenJSharp    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:openjdk-jdk10    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-jdk10    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:openjdk9    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk9    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:lookaside_java-1.8.0-openjdk    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:lookaside_java-1.8.0-openjdk    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:jdk8u_corba    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:jdk8u_corba    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:infobip-open-jdk-8    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:infobip-open-jdk-8    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:openjdk-source-code-learn    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-source-code-learn    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:OLD-OpenJDK8    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:OLD-OpenJDK8    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:openjdk-orb    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-orb    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:openjdk-icedtea7    文件:FullServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-icedtea7    文件:LocalClientRequestDispatcherBase.java   
/** 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 ;
}
项目:OpenJSharp    文件:JIDLLocalCRDImpl.java   
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
                                       String operation,
                                       Class expectedType)
{
    if (!checkForCompatibleServant( servant, expectedType ))
        return null ;

    return servant;
}
项目:OpenJSharp    文件:JIDLLocalCRDImpl.java   
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;
    }
}
项目:OpenJSharp    文件:NotLocalLocalCRDImpl.java   
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();
}
项目:OpenJSharp    文件:FullServantCacheLocalCRDImpl.java   
public void servant_postinvoke(org.omg.CORBA.Object self,
                               ServantObject servantobj)
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    cachedInfo.oa().exit() ;
    orb.popInvocationInfo() ;
}
项目:OpenJSharp    文件:InfoOnlyServantCacheLocalCRDImpl.java   
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 ;
}
项目:OpenJSharp    文件:MinimalServantCacheLocalCRDImpl.java   
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 ;
}
项目:OpenJSharp    文件:CorbaClientDelegateImpl.java   
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
                                       String operation,
                                       Class expectedType)
{
    return
        contactInfoList.getLocalClientRequestDispatcher()
        .servant_preinvoke(self, operation, expectedType);
}
项目:openjdk-jdk10    文件:JIDLLocalCRDImpl.java   
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
                                       String operation,
                                       Class expectedType)
{
    if (!checkForCompatibleServant( servant, expectedType ))
        return null ;

    return servant;
}
项目:openjdk-jdk10    文件:JIDLLocalCRDImpl.java   
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;
    }
}
项目:openjdk-jdk10    文件:NotLocalLocalCRDImpl.java   
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();
}
项目:openjdk-jdk10    文件:FullServantCacheLocalCRDImpl.java   
public void servant_postinvoke(org.omg.CORBA.Object self,
                               ServantObject servantobj)
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    cachedInfo.oa().exit() ;
    orb.popInvocationInfo() ;
}
项目:openjdk-jdk10    文件:InfoOnlyServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-jdk10    文件:MinimalServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk-jdk10    文件:CorbaClientDelegateImpl.java   
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
                                       String operation,
                                       Class expectedType)
{
    return
        contactInfoList.getLocalClientRequestDispatcher()
        .servant_preinvoke(self, operation, expectedType);
}
项目:openjdk9    文件:JIDLLocalCRDImpl.java   
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
                                       String operation,
                                       Class expectedType)
{
    if (!checkForCompatibleServant( servant, expectedType ))
        return null ;

    return servant;
}
项目:openjdk9    文件:JIDLLocalCRDImpl.java   
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;
    }
}
项目:openjdk9    文件:NotLocalLocalCRDImpl.java   
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();
}
项目:openjdk9    文件:FullServantCacheLocalCRDImpl.java   
public void servant_postinvoke(org.omg.CORBA.Object self,
                               ServantObject servantobj)
{
    OAInvocationInfo cachedInfo = getCachedInfo() ;
    cachedInfo.oa().exit() ;
    orb.popInvocationInfo() ;
}
项目:openjdk9    文件:InfoOnlyServantCacheLocalCRDImpl.java   
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 ;
}
项目:openjdk9    文件:MinimalServantCacheLocalCRDImpl.java   
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 ;
}