Java Code Examples for org.omg.PortableInterceptor.ObjectReferenceFactory

The following are top voted examples for showing how to use org.omg.PortableInterceptor.ObjectReferenceFactory. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 2
Project: openjdk-jdk10   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 3
Project: openjdk9   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 4
Project: lookaside_java-1.8.0-openjdk   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 5
Project: jdk8u_corba   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 6
Project: infobip-open-jdk-8   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 7
Project: openjdk-source-code-learn   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 8
Project: OLD-OpenJDK8   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 9
Project: openjdk-orb   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 10
Project: openjdk-icedtea7   File: POAImpl.java   Source Code and License 6 votes vote down vote up
private byte[] internalReferenceToId(
    org.omg.CORBA.Object reference ) throws WrongAdapter
{
    IOR ior = ORBUtility.getIOR( reference ) ;
    IORTemplateList thisTemplate = ior.getIORTemplates() ;

    ObjectReferenceFactory orf = getCurrentFactory() ;
    IORTemplateList poaTemplate =
        IORFactories.getIORTemplateList( orf ) ;

    if (!poaTemplate.isEquivalent( thisTemplate ))
        throw new WrongAdapter();

    // Extract the ObjectId from the first TaggedProfile in the IOR.
    // If ior was created in this POA, the same ID was used for
    // every profile through the profile templates in the currentFactory,
    // so we will get the same result from any profile.
    Iterator iter = ior.iterator() ;
    if (!iter.hasNext())
        throw iorWrapper().noProfilesInIor() ;
    TaggedProfile prof = (TaggedProfile)(iter.next()) ;
    ObjectId oid = prof.getObjectId() ;

    return oid.getId();
}
 
Example 11
Project: OpenJSharp   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 12
Project: OpenJSharp   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 13
Project: openjdk-jdk10   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 14
Project: openjdk-jdk10   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 15
Project: openjdk9   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 16
Project: openjdk9   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 17
Project: lookaside_java-1.8.0-openjdk   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 18
Project: lookaside_java-1.8.0-openjdk   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 19
Project: jdk8u_corba   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 20
Project: jdk8u_corba   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 21
Project: infobip-open-jdk-8   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 22
Project: infobip-open-jdk-8   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 23
Project: openjdk-source-code-learn   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 24
Project: openjdk-source-code-learn   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 25
Project: OLD-OpenJDK8   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 26
Project: OLD-OpenJDK8   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 27
Project: openjdk-orb   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 28
Project: openjdk-orb   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 29
Project: openjdk-icedtea7   File: IORFactories.java   Source Code and License 5 votes vote down vote up
public static IORTemplateList getIORTemplateList( ObjectReferenceFactory orf )
{
    if (orf instanceof ObjectReferenceProducerBase) {
        ObjectReferenceProducerBase base =
            (ObjectReferenceProducerBase)orf ;
        return base.getIORTemplateList() ;
    }

    throw new BAD_PARAM() ;
}
 
Example 30
Project: openjdk-icedtea7   File: TOAImpl.java   Source Code and License 5 votes vote down vote up
public void connect( org.omg.CORBA.Object objref)
{
    // Store the objref and get a userkey allocated by the transient
    // object manager.
    byte[] key = servants.storeServant(objref, null);

    // Find out the repository ID for this objref.
    String id = StubAdapter.getTypeIds( objref )[0] ;

    // Create the new objref
    ObjectReferenceFactory orf = getCurrentFactory() ;
    org.omg.CORBA.Object obj = orf.make_object( id, key ) ;

    // Copy the delegate from the new objref to the argument
    // XXX handle the case of an attempt to connect a local object.

    org.omg.CORBA.portable.Delegate delegate = StubAdapter.getDelegate(
        obj ) ;
    CorbaContactInfoList ccil = (CorbaContactInfoList)
        ((ClientDelegate)delegate).getContactInfoList() ;
    LocalClientRequestDispatcher lcs =
        ccil.getLocalClientRequestDispatcher() ;

    if (lcs instanceof JIDLLocalCRDImpl) {
        JIDLLocalCRDImpl jlcs = (JIDLLocalCRDImpl)lcs ;
        jlcs.setServant( objref ) ;
    } else {
        throw new RuntimeException(
            "TOAImpl.connect can not be called on " + lcs ) ;
    }

    StubAdapter.setDelegate( objref, delegate ) ;
}
 
Example 31
Project: OpenJSharp   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public ObjectReferenceFactory getCurrentFactory()
{
    return currentFactory ;
}
 
Example 32
Project: OpenJSharp   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public void setCurrentFactory( ObjectReferenceFactory factory )
{
    currentFactory = factory ;
}
 
Example 33
Project: OpenJSharp   File: IORFactories.java   Source Code and License 4 votes vote down vote up
public static ObjectReferenceFactory makeObjectReferenceFactory( ORB orb,
    IORTemplateList iortemps )
{
    return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
}
 
Example 34
Project: OpenJSharp   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory current_factory()
{
    checkState( STATE_ESTABLISHED) ;

    return adapter.getCurrentFactory() ;
}
 
Example 35
Project: OpenJSharp   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public void current_factory( ObjectReferenceFactory factory )
{
    checkState( STATE_ESTABLISHED) ;

    adapter.setCurrentFactory( factory ) ;
}
 
Example 36
Project: openjdk-jdk10   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public ObjectReferenceFactory getCurrentFactory()
{
    return currentFactory ;
}
 
Example 37
Project: openjdk-jdk10   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public void setCurrentFactory( ObjectReferenceFactory factory )
{
    currentFactory = factory ;
}
 
Example 38
Project: openjdk-jdk10   File: IORFactories.java   Source Code and License 4 votes vote down vote up
public static ObjectReferenceFactory makeObjectReferenceFactory( ORB orb,
    IORTemplateList iortemps )
{
    return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
}
 
Example 39
Project: openjdk-jdk10   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory current_factory()
{
    checkState( STATE_ESTABLISHED) ;

    return adapter.getCurrentFactory() ;
}
 
Example 40
Project: openjdk-jdk10   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public void current_factory( ObjectReferenceFactory factory )
{
    checkState( STATE_ESTABLISHED) ;

    adapter.setCurrentFactory( factory ) ;
}
 
Example 41
Project: openjdk9   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public ObjectReferenceFactory getCurrentFactory()
{
    return currentFactory ;
}
 
Example 42
Project: openjdk9   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public void setCurrentFactory( ObjectReferenceFactory factory )
{
    currentFactory = factory ;
}
 
Example 43
Project: openjdk9   File: IORFactories.java   Source Code and License 4 votes vote down vote up
public static ObjectReferenceFactory makeObjectReferenceFactory( ORB orb,
    IORTemplateList iortemps )
{
    return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
}
 
Example 44
Project: openjdk9   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory current_factory()
{
    checkState( STATE_ESTABLISHED) ;

    return adapter.getCurrentFactory() ;
}
 
Example 45
Project: openjdk9   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public void current_factory( ObjectReferenceFactory factory )
{
    checkState( STATE_ESTABLISHED) ;

    adapter.setCurrentFactory( factory ) ;
}
 
Example 46
Project: lookaside_java-1.8.0-openjdk   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public ObjectReferenceFactory getCurrentFactory()
{
    return currentFactory ;
}
 
Example 47
Project: lookaside_java-1.8.0-openjdk   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public void setCurrentFactory( ObjectReferenceFactory factory )
{
    currentFactory = factory ;
}
 
Example 48
Project: lookaside_java-1.8.0-openjdk   File: IORFactories.java   Source Code and License 4 votes vote down vote up
public static ObjectReferenceFactory makeObjectReferenceFactory( ORB orb,
    IORTemplateList iortemps )
{
    return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
}
 
Example 49
Project: lookaside_java-1.8.0-openjdk   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory current_factory()
{
    checkState( STATE_ESTABLISHED) ;

    return adapter.getCurrentFactory() ;
}
 
Example 50
Project: lookaside_java-1.8.0-openjdk   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public void current_factory( ObjectReferenceFactory factory )
{
    checkState( STATE_ESTABLISHED) ;

    adapter.setCurrentFactory( factory ) ;
}
 
Example 51
Project: jdk8u_corba   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public ObjectReferenceFactory getCurrentFactory()
{
    return currentFactory ;
}
 
Example 52
Project: jdk8u_corba   File: ObjectAdapterBase.java   Source Code and License 4 votes vote down vote up
final public void setCurrentFactory( ObjectReferenceFactory factory )
{
    currentFactory = factory ;
}
 
Example 53
Project: jdk8u_corba   File: IORFactories.java   Source Code and License 4 votes vote down vote up
public static ObjectReferenceFactory makeObjectReferenceFactory( ORB orb,
    IORTemplateList iortemps )
{
    return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
}
 
Example 54
Project: jdk8u_corba   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory current_factory()
{
    checkState( STATE_ESTABLISHED) ;

    return adapter.getCurrentFactory() ;
}
 
Example 55
Project: jdk8u_corba   File: IORInfoImpl.java   Source Code and License 4 votes vote down vote up
public void current_factory( ObjectReferenceFactory factory )
{
    checkState( STATE_ESTABLISHED) ;

    adapter.setCurrentFactory( factory ) ;
}
 
Example 56
Project: javify   File: gnuPOA.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory getReferenceFactory()
{
  return m_object_factory;
}
 
Example 57
Project: javify   File: gnuPOA.java   Source Code and License 4 votes vote down vote up
public void setReferenceFactory(ObjectReferenceFactory factory)
{
  m_object_factory = factory;
}
 
Example 58
Project: javify   File: gnuIorInfo.java   Source Code and License 4 votes vote down vote up
/**
 * Get the object factory of the current POA.
 */
public ObjectReferenceFactory current_factory()
{
  return poa.getReferenceFactory();
}
 
Example 59
Project: javify   File: gnuIorInfo.java   Source Code and License 4 votes vote down vote up
/**
 * Set the object factory of the current POA.
 */
public void current_factory(ObjectReferenceFactory factory)
{
  poa.setReferenceFactory(factory);
}
 
Example 60
Project: jvm-stm   File: gnuPOA.java   Source Code and License 4 votes vote down vote up
public ObjectReferenceFactory getReferenceFactory()
{
  return m_object_factory;
}