类org.omg.CORBA.portable.Delegate源码实例Demo

下面列出了怎么用org.omg.CORBA.portable.Delegate的API类实例代码及写法,或者点击链接到github查看源代码。

/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码2 项目: openjdk-jdk9   文件: StubInvocationHandlerImpl.java
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
源代码3 项目: TencentKona-8   文件: CorbaClientDelegateImpl.java
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码4 项目: TencentKona-8   文件: StubInvocationHandlerImpl.java
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
源代码6 项目: jdk8u60   文件: CorbaClientDelegateImpl.java
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码7 项目: jdk8u60   文件: StubInvocationHandlerImpl.java
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
源代码8 项目: jdk8u60   文件: StubIORImpl.java
public Delegate getDelegate( ORB orb )
{
    // write the IOR components to an org.omg.CORBA.portable.OutputStream
    OutputStream ostr = orb.create_output_stream();
    ostr.write_long(typeData.length);
    ostr.write_octet_array(typeData, 0, typeData.length);
    ostr.write_long(profileTags.length);
    for (int i = 0; i < profileTags.length; i++) {
        ostr.write_long(profileTags[i]);
        ostr.write_long(profileData[i].length);
        ostr.write_octet_array(profileData[i], 0, profileData[i].length);
    }

    InputStream istr = ostr.create_input_stream() ;

    // read the IOR back from the stream
    org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
    return StubAdapter.getDelegate( obj ) ;
}
 
源代码9 项目: openjdk-jdk9   文件: CorbaClientDelegateImpl.java
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码10 项目: JDKSourceCode1.8   文件: CorbaClientDelegateImpl.java
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
源代码12 项目: JDKSourceCode1.8   文件: StubIORImpl.java
public Delegate getDelegate( ORB orb )
{
    // write the IOR components to an org.omg.CORBA.portable.OutputStream
    OutputStream ostr = orb.create_output_stream();
    ostr.write_long(typeData.length);
    ostr.write_octet_array(typeData, 0, typeData.length);
    ostr.write_long(profileTags.length);
    for (int i = 0; i < profileTags.length; i++) {
        ostr.write_long(profileTags[i]);
        ostr.write_long(profileData[i].length);
        ostr.write_octet_array(profileData[i], 0, profileData[i].length);
    }

    InputStream istr = ostr.create_input_stream() ;

    // read the IOR back from the stream
    org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
    return StubAdapter.getDelegate( obj ) ;
}
 
源代码13 项目: openjdk-jdk8u   文件: CorbaClientDelegateImpl.java
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码14 项目: openjdk-jdk8u   文件: StubInvocationHandlerImpl.java
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
源代码15 项目: openjdk-jdk8u   文件: StubIORImpl.java
public Delegate getDelegate( ORB orb )
{
    // write the IOR components to an org.omg.CORBA.portable.OutputStream
    OutputStream ostr = orb.create_output_stream();
    ostr.write_long(typeData.length);
    ostr.write_octet_array(typeData, 0, typeData.length);
    ostr.write_long(profileTags.length);
    for (int i = 0; i < profileTags.length; i++) {
        ostr.write_long(profileTags[i]);
        ostr.write_long(profileData[i].length);
        ostr.write_octet_array(profileData[i], 0, profileData[i].length);
    }

    InputStream istr = ostr.create_input_stream() ;

    // read the IOR back from the stream
    org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
    return StubAdapter.getDelegate( obj ) ;
}
 
源代码16 项目: openjdk-jdk9   文件: StubIORImpl.java
public Delegate getDelegate( ORB orb )
{
    // write the IOR components to an org.omg.CORBA.portable.OutputStream
    OutputStream ostr = orb.create_output_stream();
    ostr.write_long(typeData.length);
    ostr.write_octet_array(typeData, 0, typeData.length);
    ostr.write_long(profileTags.length);
    for (int i = 0; i < profileTags.length; i++) {
        ostr.write_long(profileTags[i]);
        ostr.write_long(profileData[i].length);
        ostr.write_octet_array(profileData[i], 0, profileData[i].length);
    }

    InputStream istr = ostr.create_input_stream() ;

    // read the IOR back from the stream
    org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
    return StubAdapter.getDelegate( obj ) ;
}
 
/**
 * This method overrides the org.omg.CORBA.portable.Delegate.equals method,
 * and does the equality check based on IOR equality.
 */
public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
{
    if (other == null)
        return false ;

    if (!StubAdapter.isStub(other)) {
        return false;
    }

    Delegate delegate = StubAdapter.getDelegate( other ) ;
    if (delegate == null)
        return false ;

    if (delegate instanceof CorbaClientDelegateImpl) {
        CorbaClientDelegateImpl otherDel = (CorbaClientDelegateImpl)
            delegate ;
        IOR otherIor = otherDel.contactInfoList.getTargetIOR();
        return this.contactInfoList.getTargetIOR().equals(otherIor);
    }

    // Come here if other is not implemented by our ORB.
    return false;
}
 
源代码18 项目: openjdk-jdk9   文件: CorbaClientDelegateImpl.java
public boolean is_equivalent(org.omg.CORBA.Object obj,
                             org.omg.CORBA.Object ref)
{
    if ( ref == null )
        return false;

    // If ref is a local object, it is not a Stub!
    if (!StubAdapter.isStub(ref))
        return false ;

    Delegate del = StubAdapter.getDelegate(ref) ;
    if (del == null)
        return false ;

    // Optimize the x.is_equivalent( x ) case
    if (del == this)
        return true;

    // If delegate was created by a different ORB, return false
    if (!(del instanceof CorbaClientDelegateImpl))
        return false ;

    CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
    CorbaContactInfoList ccil =
        (CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
    return this.contactInfoList.getTargetIOR().isEquivalent(
        ccil.getTargetIOR() );
}
 
源代码19 项目: jdk1.8-source-analysis   文件: StubAdapter.java
/** This also gets the delegate from a Servant by
 * using Servant._this_object()
 */
public static Delegate getDelegate( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getDelegate() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._get_delegate() ;
    else if (stub instanceof Tie) {
        Tie tie = (Tie)stub ;
        org.omg.CORBA.Object ref = activateTie( tie ) ;
        return getDelegate( ref ) ;
    } else
        throw wrapper.getDelegateRequiresStub() ;
}
 
public boolean is_equivalent(org.omg.CORBA.Object obj,
                             org.omg.CORBA.Object ref)
{
    if ( ref == null )
        return false;

    // If ref is a local object, it is not a Stub!
    if (!StubAdapter.isStub(ref))
        return false ;

    Delegate del = StubAdapter.getDelegate(ref) ;
    if (del == null)
        return false ;

    // Optimize the x.is_equivalent( x ) case
    if (del == this)
        return true;

    // If delegate was created by a different ORB, return false
    if (!(del instanceof CorbaClientDelegateImpl))
        return false ;

    CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
    CorbaContactInfoList ccil =
        (CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
    return this.contactInfoList.getTargetIOR().isEquivalent(
        ccil.getTargetIOR() );
}
 
源代码21 项目: openjdk-jdk9   文件: StubAdapter.java
public static void setDelegate( Object stub, Delegate delegate )
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).setDelegate( delegate ) ;
    else if (stub instanceof ObjectImpl)
        ((ObjectImpl)stub)._set_delegate( delegate ) ;
    else
        throw wrapper.setDelegateRequiresStub() ;
}
 
源代码22 项目: TencentKona-8   文件: StubAdapter.java
public static void setDelegate( Object stub, Delegate delegate )
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).setDelegate( delegate ) ;
    else if (stub instanceof ObjectImpl)
        ((ObjectImpl)stub)._set_delegate( delegate ) ;
    else
        throw wrapper.setDelegateRequiresStub() ;
}
 
源代码23 项目: TencentKona-8   文件: StubAdapter.java
/** This also gets the delegate from a Servant by
 * using Servant._this_object()
 */
public static Delegate getDelegate( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getDelegate() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._get_delegate() ;
    else if (stub instanceof Tie) {
        Tie tie = (Tie)stub ;
        org.omg.CORBA.Object ref = activateTie( tie ) ;
        return getDelegate( ref ) ;
    } else
        throw wrapper.getDelegateRequiresStub() ;
}
 
源代码24 项目: TencentKona-8   文件: CorbaClientDelegateImpl.java
public boolean is_equivalent(org.omg.CORBA.Object obj,
                             org.omg.CORBA.Object ref)
{
    if ( ref == null )
        return false;

    // If ref is a local object, it is not a Stub!
    if (!StubAdapter.isStub(ref))
        return false ;

    Delegate del = StubAdapter.getDelegate(ref) ;
    if (del == null)
        return false ;

    // Optimize the x.is_equivalent( x ) case
    if (del == this)
        return true;

    // If delegate was created by a different ORB, return false
    if (!(del instanceof CorbaClientDelegateImpl))
        return false ;

    CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
    CorbaContactInfoList ccil =
        (CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
    return this.contactInfoList.getTargetIOR().isEquivalent(
        ccil.getTargetIOR() );
}
 
源代码25 项目: jdk8u60   文件: StubAdapter.java
public static void setDelegate( Object stub, Delegate delegate )
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).setDelegate( delegate ) ;
    else if (stub instanceof ObjectImpl)
        ((ObjectImpl)stub)._set_delegate( delegate ) ;
    else
        throw wrapper.setDelegateRequiresStub() ;
}
 
源代码26 项目: jdk8u60   文件: CorbaClientDelegateImpl.java
public boolean is_equivalent(org.omg.CORBA.Object obj,
                             org.omg.CORBA.Object ref)
{
    if ( ref == null )
        return false;

    // If ref is a local object, it is not a Stub!
    if (!StubAdapter.isStub(ref))
        return false ;

    Delegate del = StubAdapter.getDelegate(ref) ;
    if (del == null)
        return false ;

    // Optimize the x.is_equivalent( x ) case
    if (del == this)
        return true;

    // If delegate was created by a different ORB, return false
    if (!(del instanceof CorbaClientDelegateImpl))
        return false ;

    CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
    CorbaContactInfoList ccil =
        (CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
    return this.contactInfoList.getTargetIOR().isEquivalent(
        ccil.getTargetIOR() );
}
 
源代码27 项目: JDKSourceCode1.8   文件: StubAdapter.java
public static void setDelegate( Object stub, Delegate delegate )
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).setDelegate( delegate ) ;
    else if (stub instanceof ObjectImpl)
        ((ObjectImpl)stub)._set_delegate( delegate ) ;
    else
        throw wrapper.setDelegateRequiresStub() ;
}
 
源代码28 项目: JDKSourceCode1.8   文件: StubAdapter.java
/** This also gets the delegate from a Servant by
 * using Servant._this_object()
 */
public static Delegate getDelegate( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getDelegate() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._get_delegate() ;
    else if (stub instanceof Tie) {
        Tie tie = (Tie)stub ;
        org.omg.CORBA.Object ref = activateTie( tie ) ;
        return getDelegate( ref ) ;
    } else
        throw wrapper.getDelegateRequiresStub() ;
}
 
源代码29 项目: JDKSourceCode1.8   文件: CorbaClientDelegateImpl.java
public boolean is_equivalent(org.omg.CORBA.Object obj,
                             org.omg.CORBA.Object ref)
{
    if ( ref == null )
        return false;

    // If ref is a local object, it is not a Stub!
    if (!StubAdapter.isStub(ref))
        return false ;

    Delegate del = StubAdapter.getDelegate(ref) ;
    if (del == null)
        return false ;

    // Optimize the x.is_equivalent( x ) case
    if (del == this)
        return true;

    // If delegate was created by a different ORB, return false
    if (!(del instanceof CorbaClientDelegateImpl))
        return false ;

    CorbaClientDelegateImpl corbaDelegate = (CorbaClientDelegateImpl)del ;
    CorbaContactInfoList ccil =
        (CorbaContactInfoList)corbaDelegate.getContactInfoList() ;
    return this.contactInfoList.getTargetIOR().isEquivalent(
        ccil.getTargetIOR() );
}
 
源代码30 项目: openjdk-jdk8u   文件: StubAdapter.java
public static void setDelegate( Object stub, Delegate delegate )
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).setDelegate( delegate ) ;
    else if (stub instanceof ObjectImpl)
        ((ObjectImpl)stub)._set_delegate( delegate ) ;
    else
        throw wrapper.setDelegateRequiresStub() ;
}
 
 类所在包
 类方法
 同包方法