Java Code Examples for org.omg.CORBA.portable.Delegate

The following examples show how to use org.omg.CORBA.portable.Delegate. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientDelegateImpl.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #2
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: StubInvocationHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example #3
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source Project: TencentKona-8   Author: Tencent   File: StubInvocationHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example #5
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: StubInvocationHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example #6
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source Project: jdk8u60   Author: chenghanpeng   File: StubInvocationHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example #8
Source Project: jdk8u60   Author: chenghanpeng   File: StubIORImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
}
 
Example #9
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #10
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientDelegateImpl.java    License: MIT License 6 votes vote down vote up
/**
 * 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;
}
 
Example #11
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: StubInvocationHandlerImpl.java    License: MIT License 6 votes vote down vote up
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 ;
}
 
Example #12
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: StubIORImpl.java    License: MIT License 6 votes vote down vote up
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 ) ;
}
 
Example #13
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #14
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: StubInvocationHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example #15
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: StubIORImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
}
 
Example #16
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: StubIORImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
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 ) ;
}
 
Example #17
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #18
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() );
}
 
Example #19
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: StubAdapter.java    License: Apache License 2.0 5 votes vote down vote up
/** 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() ;
}
 
Example #20
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientDelegateImpl.java    License: Apache License 2.0 5 votes vote down vote up
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() );
}
 
Example #21
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() ;
}
 
Example #22
Source Project: TencentKona-8   Author: Tencent   File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() ;
}
 
Example #23
Source Project: TencentKona-8   Author: Tencent   File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
/** 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() ;
}
 
Example #24
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() );
}
 
Example #25
Source Project: jdk8u60   Author: chenghanpeng   File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() ;
}
 
Example #26
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() );
}
 
Example #27
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: StubAdapter.java    License: MIT License 5 votes vote down vote up
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() ;
}
 
Example #28
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: StubAdapter.java    License: MIT License 5 votes vote down vote up
/** 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() ;
}
 
Example #29
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaClientDelegateImpl.java    License: MIT License 5 votes vote down vote up
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() );
}
 
Example #30
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
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() ;
}