org.omg.PortableServer.POAPackage.ObjectNotActive Java Examples

The following examples show how to use org.omg.PortableServer.POAPackage.ObjectNotActive. 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 File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_servant</code>
 * <b>3.3.8.23</b>
 */
public Servant id_to_servant(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_servant(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }
        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #2
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
Example #3
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #4
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
Example #5
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_servant</code>
 * <b>3.3.8.23</b>
 */
public Servant id_to_servant(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_servant(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }
        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #6
Source File: POAImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #7
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * <code>id_to_servant</code>
 * <b>3.3.8.23</b>
 */
public Servant id_to_servant(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_servant(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }
        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #8
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #9
Source File: POAImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #10
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #11
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
Example #12
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #13
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #14
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #15
Source File: POAImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
Example #16
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example #17
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #18
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * <code>id_to_servant</code>
 * <b>3.3.8.23</b>
 */
public Servant id_to_servant(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_servant(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }
        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #19
Source File: POAImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
Example #20
Source File: POAImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * <code>id_to_servant</code>
 * <b>3.3.8.23</b>
 */
public Servant id_to_servant(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_servant(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }
        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
Example #21
Source File: POAPolicyMediatorImpl_R_UDS.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Servant idToServant( byte[] id )
    throws WrongPolicy, ObjectNotActive
{
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
    Servant s = internalKeyToServant(key);

    if (s == null)
        if (defaultServant != null)
            s = defaultServant;

    if (s == null)
        throw new ObjectNotActive() ;

    return s;
}
 
Example #22
Source File: POAPolicyMediatorImpl_R_AOM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Servant idToServant( byte[] id )
    throws WrongPolicy, ObjectNotActive
{
    Servant s = internalIdToServant( id ) ;

    if (s == null)
        throw new ObjectNotActive() ;
    else
        return s;
}
 
Example #23
Source File: POAPolicyMediatorBase_R.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
    Servant s ) throws ObjectNotActive, WrongPolicy
{
    // Default does nothing, but the USE_SERVANT_MANAGER case
    // must handle etherealization

    activeObjectMap.remove(key);

    if (Util.isInstanceDefined()) {
        POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
        POAFactory factory = pm.getFactory() ;
        factory.unregisterPOAForServant(poa, s);
    }
}
 
Example #24
Source File: POAPolicyMediatorBase_R.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
    Servant s ) throws ObjectNotActive, WrongPolicy
{
    // Default does nothing, but the USE_SERVANT_MANAGER case
    // must handle etherealization

    activeObjectMap.remove(key);

    if (Util.isInstanceDefined()) {
        POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
        POAFactory factory = pm.getFactory() ;
        factory.unregisterPOAForServant(poa, s);
    }
}
 
Example #25
Source File: POAPolicyMediatorBase_R.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Servant deactivateObject( ActiveObjectMap.Key key )
    throws ObjectNotActive, WrongPolicy
{
    if (orb.poaDebugFlag) {
        ORBUtility.dprint( this,
            "Calling deactivateObject for key " + key ) ;
    }

    try {
        AOMEntry entry = activeObjectMap.get(key);
        if (entry == null)
            throw new ObjectNotActive();

        Servant s = activeObjectMap.getServant( entry ) ;
        if (s == null)
            throw new ObjectNotActive();

        if (orb.poaDebugFlag) {
            System.out.println("Deactivating object " + s + " with POA " + poa);
        }

        deactivateHelper( key, entry, s ) ;

        return s ;
    } finally {
        if (orb.poaDebugFlag) {
            ORBUtility.dprint( this,
                "Exiting deactivateObject" ) ;
        }
    }
}
 
Example #26
Source File: POAPolicyMediatorImpl_R_USM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
    Servant servant ) throws ObjectNotActive, WrongPolicy
{
    if (activator == null)
        throw poa.invocationWrapper().poaNoServantManager() ;

    Etherealizer eth = new Etherealizer( this, key, entry, servant, poa.getDebug() ) ;
    entry.startEtherealize( eth ) ;
}
 
Example #27
Source File: POAPolicyMediatorImpl_R_UDS.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Servant idToServant( byte[] id )
    throws WrongPolicy, ObjectNotActive
{
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
    Servant s = internalKeyToServant(key);

    if (s == null)
        if (defaultServant != null)
            s = defaultServant;

    if (s == null)
        throw new ObjectNotActive() ;

    return s;
}
 
Example #28
Source File: POAPolicyMediatorImpl_R_USM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Servant idToServant( byte[] id )
    throws WrongPolicy, ObjectNotActive
{
    ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
    AOMEntry entry = activeObjectMap.get(key);

    Servant servant = activeObjectMap.getServant( entry ) ;
    if (servant != null)
        return servant ;
    else
        throw new ObjectNotActive() ;
}
 
Example #29
Source File: POAPolicyMediatorImpl_R_USM.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
    Servant servant ) throws ObjectNotActive, WrongPolicy
{
    if (activator == null)
        throw poa.invocationWrapper().poaNoServantManager() ;

    Etherealizer eth = new Etherealizer( this, key, entry, servant, poa.getDebug() ) ;
    entry.startEtherealize( eth ) ;
}
 
Example #30
Source File: POAPolicyMediatorBase_R.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
protected void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
    Servant s ) throws ObjectNotActive, WrongPolicy
{
    // Default does nothing, but the USE_SERVANT_MANAGER case
    // must handle etherealization

    activeObjectMap.remove(key);

    if (Util.isInstanceDefined()) {
        POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
        POAFactory factory = pm.getFactory() ;
        factory.unregisterPOAForServant(poa, s);
    }
}