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

The following examples show how to use org.omg.CORBA.portable.ObjectImpl. 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   Source File: StubAdapter.java    License: Apache License 2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 2
Source Project: TencentKona-8   Source File: StubAdapter.java    License: GNU General Public License v2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 3
Source Project: jdk8u60   Source File: StubAdapter.java    License: GNU General Public License v2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 4
Source Project: JDKSourceCode1.8   Source File: StubAdapter.java    License: MIT License 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 5
Source Project: openjdk-jdk8u   Source File: StubAdapter.java    License: GNU General Public License v2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 6
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 7
Source Project: openjdk-8   Source File: StubAdapter.java    License: GNU General Public License v2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 8
Source Project: openjdk-8-source   Source File: StubAdapter.java    License: GNU General Public License v2.0 6 votes vote down vote up
/** Given any Tie, return the corresponding object refernce, activating
 * the Servant if necessary.
 */
public static org.omg.CORBA.Object activateTie( Tie tie )
{
    /** Any implementation of Tie should be either a Servant or an ObjectImpl,
     * depending on which style of code generation is used.  rmic -iiop by
     * default results in an ObjectImpl-based Tie, while rmic -iiop -poa
     * results in a Servant-based Tie.  Dynamic RMI-IIOP also uses Servant-based
     * Ties (see impl.presentation.rmi.ReflectiveTie).
     */
    if (tie instanceof ObjectImpl) {
        return tie.thisObject() ;
    } else if (tie instanceof Servant) {
        Servant servant = (Servant)tie ;
        return activateServant( servant ) ;
    } else {
        throw wrapper.badActivateTieCall() ;
    }
}
 
Example 9
Source Project: jdk1.8-source-analysis   Source File: StubAdapter.java    License: Apache License 2.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 10
Source Project: jdk1.8-source-analysis   Source 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 11
Source Project: jdk1.8-source-analysis   Source File: StubAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public static ORB getORB( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getORB() ;
    else if (stub instanceof ObjectImpl)
        return (ORB)((ObjectImpl)stub)._orb() ;
    else
        throw wrapper.getOrbRequiresStub() ;
}
 
Example 12
Source Project: openjdk-8-source   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void connect( Object stub,
    ORB orb ) throws java.rmi.RemoteException
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).connect(
            (com.sun.corba.se.spi.orb.ORB)orb ) ;
    else if (stub instanceof javax.rmi.CORBA.Stub)
        ((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
    else if (stub instanceof ObjectImpl)
        orb.connect( (org.omg.CORBA.Object)stub ) ;
    else
        throw wrapper.connectRequiresStub() ;
}
 
Example 13
Source Project: jdk1.8-source-analysis   Source File: StubAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public static void connect( Object stub,
    ORB orb ) throws java.rmi.RemoteException
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).connect(
            (com.sun.corba.se.spi.orb.ORB)orb ) ;
    else if (stub instanceof javax.rmi.CORBA.Stub)
        ((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
    else if (stub instanceof ObjectImpl)
        orb.connect( (org.omg.CORBA.Object)stub ) ;
    else
        throw wrapper.connectRequiresStub() ;
}
 
Example 14
Source Project: openjdk-8-source   Source 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 15
Source Project: jdk1.8-source-analysis   Source File: StubAdapter.java    License: Apache License 2.0 5 votes vote down vote up
public static OutputStream request( Object stub,
    String operation, boolean responseExpected )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).request( operation,
            responseExpected ) ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._request( operation,
            responseExpected ) ;
    else
        throw wrapper.requestRequiresStub() ;
}
 
Example 16
Source Project: TencentKona-8   Source 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 17
Source Project: TencentKona-8   Source 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 18
Source Project: TencentKona-8   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static ORB getORB( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getORB() ;
    else if (stub instanceof ObjectImpl)
        return (ORB)((ObjectImpl)stub)._orb() ;
    else
        throw wrapper.getOrbRequiresStub() ;
}
 
Example 19
Source Project: TencentKona-8   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String[] getTypeIds( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getTypeIds() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._ids() ;
    else
        throw wrapper.getTypeIdsRequiresStub() ;
}
 
Example 20
Source Project: TencentKona-8   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static boolean isLocal( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).isLocal() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._is_local() ;
    else
        throw wrapper.isLocalRequiresStub() ;
}
 
Example 21
Source Project: jdk8u60   Source 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: jdk8u60   Source 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 23
Source Project: jdk8u60   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static ORB getORB( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getORB() ;
    else if (stub instanceof ObjectImpl)
        return (ORB)((ObjectImpl)stub)._orb() ;
    else
        throw wrapper.getOrbRequiresStub() ;
}
 
Example 24
Source Project: openjdk-8   Source 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 25
Source Project: jdk8u60   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void connect( Object stub,
    ORB orb ) throws java.rmi.RemoteException
{
    if (stub instanceof DynamicStub)
        ((DynamicStub)stub).connect(
            (com.sun.corba.se.spi.orb.ORB)orb ) ;
    else if (stub instanceof javax.rmi.CORBA.Stub)
        ((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
    else if (stub instanceof ObjectImpl)
        orb.connect( (org.omg.CORBA.Object)stub ) ;
    else
        throw wrapper.connectRequiresStub() ;
}
 
Example 26
Source Project: jdk8u60   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static boolean isLocal( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).isLocal() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._is_local() ;
    else
        throw wrapper.isLocalRequiresStub() ;
}
 
Example 27
Source Project: jdk8u60   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static OutputStream request( Object stub,
    String operation, boolean responseExpected )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).request( operation,
            responseExpected ) ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._request( operation,
            responseExpected ) ;
    else
        throw wrapper.requestRequiresStub() ;
}
 
Example 28
Source Project: openjdk-8-source   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static ORB getORB( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).getORB() ;
    else if (stub instanceof ObjectImpl)
        return (ORB)((ObjectImpl)stub)._orb() ;
    else
        throw wrapper.getOrbRequiresStub() ;
}
 
Example 29
Source Project: openjdk-8-source   Source File: StubAdapter.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static boolean isLocal( Object stub )
{
    if (stub instanceof DynamicStub)
        return ((DynamicStub)stub).isLocal() ;
    else if (stub instanceof ObjectImpl)
        return ((ObjectImpl)stub)._is_local() ;
    else
        throw wrapper.isLocalRequiresStub() ;
}
 
Example 30
Source Project: JDKSourceCode1.8   Source 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() ;
}