org.omg.PortableServer.POAManagerPackage.State Java Examples
The following examples show how to use
org.omg.PortableServer.POAManagerPackage.State.
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: POAManagerImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #2
Source File: POAManagerImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #3
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #4
Source File: POAManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #5
Source File: POAManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #6
Source File: POAManagerImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #7
Source File: POAManagerImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
private void checkState() { while ( state.value() != State._ACTIVE ) { switch ( state.value() ) { case State._HOLDING: while ( state.value() == State._HOLDING ) { countedWait() ; } break; case State._DISCARDING: throw factory.getWrapper().poaDiscarding() ; case State._INACTIVE: throw factory.getWrapper().poaInactive() ; } } }
Example #8
Source File: POAManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private String stateToString( State state ) { switch (state.value()) { case State._HOLDING : return "State[HOLDING]" ; case State._ACTIVE : return "State[ACTIVE]" ; case State._DISCARDING : return "State[DISCARDING]" ; case State._INACTIVE : return "State[INACTIVE]" ; } return "State[UNKNOWN]" ; }
Example #9
Source File: POAManagerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public short getORTState() { switch (state.value()) { case State._HOLDING : return HOLDING.value ; case State._ACTIVE : return ACTIVE.value ; case State._INACTIVE : return INACTIVE.value ; case State._DISCARDING : return DISCARDING.value ; default : return NON_EXISTENT.value ; } }
Example #10
Source File: POAManagerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
POAManagerImpl( POAFactory factory, PIHandler pihandler ) { this.factory = factory ; factory.addPoaManager(this); this.pihandler = pihandler ; myId = factory.newPOAManagerId() ; state = State.HOLDING; debug = factory.getORB().poaDebugFlag ; explicitStateChange = false ; if (debug) { ORBUtility.dprint( this, "Creating POAManagerImpl " + this ) ; } }
Example #11
Source File: POAManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example #12
Source File: POAManagerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * <code>discard_requests</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void discard_requests(boolean wait_for_completion) throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling hold_requests on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to DISCARDING state = State.DISCARDING; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any invocations that were waiting because the previous // state was HOLDING. Those invocations will henceforth be rejected with // a TRANSIENT exception. Also notify any threads that were waiting // inside hold_requests(). notifyWaiters(); if ( wait_for_completion ) { while ( state.value() == State._DISCARDING && nInvocations > 0 ) { countedWait() ; } } } finally { if (debug) { ORBUtility.dprint( this, "Exiting hold_requests on POAManager " + this ) ; } } }
Example #13
Source File: POAManagerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public short getORTState() { switch (state.value()) { case State._HOLDING : return HOLDING.value ; case State._ACTIVE : return ACTIVE.value ; case State._INACTIVE : return INACTIVE.value ; case State._DISCARDING : return DISCARDING.value ; default : return NON_EXISTENT.value ; } }
Example #14
Source File: POAManagerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private String stateToString( State state ) { switch (state.value()) { case State._HOLDING : return "State[HOLDING]" ; case State._ACTIVE : return "State[ACTIVE]" ; case State._DISCARDING : return "State[DISCARDING]" ; case State._INACTIVE : return "State[INACTIVE]" ; } return "State[UNKNOWN]" ; }
Example #15
Source File: POAManagerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * <code>hold_requests</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void hold_requests(boolean wait_for_completion) throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling hold_requests on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to HOLDING state = State.HOLDING; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any threads that were waiting in the wait() inside // discard_requests. This will cause discard_requests to return // (which is in conformance with the spec). notifyWaiters(); if ( wait_for_completion ) { while ( state.value() == State._HOLDING && nInvocations > 0 ) { countedWait() ; } } } finally { if (debug) { ORBUtility.dprint( this, "Exiting hold_requests on POAManager " + this ) ; } } }
Example #16
Source File: POAManagerImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example #17
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public short getORTState() { switch (state.value()) { case State._HOLDING : return HOLDING.value ; case State._ACTIVE : return ACTIVE.value ; case State._INACTIVE : return INACTIVE.value ; case State._DISCARDING : return DISCARDING.value ; default : return NON_EXISTENT.value ; } }
Example #18
Source File: POAManagerImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example #19
Source File: POAManagerImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * <code>activate</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void activate() throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling activate on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to ACTIVE state = State.ACTIVE; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any invocations that were waiting because the previous // state was HOLDING, as well as notify any threads that were waiting // inside hold_requests() or discard_requests(). notifyWaiters(); } finally { if (debug) { ORBUtility.dprint( this, "Exiting activate on POAManager " + this ) ; } } }
Example #20
Source File: POAManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * <code>discard_requests</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void discard_requests(boolean wait_for_completion) throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling hold_requests on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to DISCARDING state = State.DISCARDING; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any invocations that were waiting because the previous // state was HOLDING. Those invocations will henceforth be rejected with // a TRANSIENT exception. Also notify any threads that were waiting // inside hold_requests(). notifyWaiters(); if ( wait_for_completion ) { while ( state.value() == State._DISCARDING && nInvocations > 0 ) { countedWait() ; } } } finally { if (debug) { ORBUtility.dprint( this, "Exiting hold_requests on POAManager " + this ) ; } } }
Example #21
Source File: POAManagerImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * <code>hold_requests</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void hold_requests(boolean wait_for_completion) throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling hold_requests on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to HOLDING state = State.HOLDING; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any threads that were waiting in the wait() inside // discard_requests. This will cause discard_requests to return // (which is in conformance with the spec). notifyWaiters(); if ( wait_for_completion ) { while ( state.value() == State._HOLDING && nInvocations > 0 ) { countedWait() ; } } } finally { if (debug) { ORBUtility.dprint( this, "Exiting hold_requests on POAManager " + this ) ; } } }
Example #22
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * <code>activate</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void activate() throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling activate on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to ACTIVE state = State.ACTIVE; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any invocations that were waiting because the previous // state was HOLDING, as well as notify any threads that were waiting // inside hold_requests() or discard_requests(). notifyWaiters(); } finally { if (debug) { ORBUtility.dprint( this, "Exiting activate on POAManager " + this ) ; } } }
Example #23
Source File: POAManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * <code>activate</code> * <b>Spec: pages 3-14 thru 3-18</b> */ public synchronized void activate() throws org.omg.PortableServer.POAManagerPackage.AdapterInactive { explicitStateChange = true ; if (debug) { ORBUtility.dprint( this, "Calling activate on POAManager " + this ) ; } try { if ( state.value() == State._INACTIVE ) throw new org.omg.PortableServer.POAManagerPackage.AdapterInactive(); // set the state to ACTIVE state = State.ACTIVE; pihandler.adapterManagerStateChanged( myId, getORTState() ) ; // Notify any invocations that were waiting because the previous // state was HOLDING, as well as notify any threads that were waiting // inside hold_requests() or discard_requests(). notifyWaiters(); } finally { if (debug) { ORBUtility.dprint( this, "Exiting activate on POAManager " + this ) ; } } }
Example #24
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private String stateToString( State state ) { switch (state.value()) { case State._HOLDING : return "State[HOLDING]" ; case State._ACTIVE : return "State[ACTIVE]" ; case State._DISCARDING : return "State[DISCARDING]" ; case State._INACTIVE : return "State[INACTIVE]" ; } return "State[UNKNOWN]" ; }
Example #25
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
POAManagerImpl( POAFactory factory, PIHandler pihandler ) { this.factory = factory ; factory.addPoaManager(this); this.pihandler = pihandler ; myId = factory.newPOAManagerId() ; state = State.HOLDING; debug = factory.getORB().poaDebugFlag ; explicitStateChange = false ; if (debug) { ORBUtility.dprint( this, "Creating POAManagerImpl " + this ) ; } }
Example #26
Source File: POAManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
POAManagerImpl( POAFactory factory, PIHandler pihandler ) { this.factory = factory ; factory.addPoaManager(this); this.pihandler = pihandler ; myId = factory.newPOAManagerId() ; state = State.HOLDING; debug = factory.getORB().poaDebugFlag ; explicitStateChange = false ; if (debug) { ORBUtility.dprint( this, "Creating POAManagerImpl " + this ) ; } }
Example #27
Source File: POAManagerImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
private String stateToString( State state ) { switch (state.value()) { case State._HOLDING : return "State[HOLDING]" ; case State._ACTIVE : return "State[ACTIVE]" ; case State._DISCARDING : return "State[DISCARDING]" ; case State._INACTIVE : return "State[INACTIVE]" ; } return "State[UNKNOWN]" ; }
Example #28
Source File: POAManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private String stateToString( State state ) { switch (state.value()) { case State._HOLDING : return "State[HOLDING]" ; case State._ACTIVE : return "State[ACTIVE]" ; case State._DISCARDING : return "State[DISCARDING]" ; case State._INACTIVE : return "State[INACTIVE]" ; } return "State[UNKNOWN]" ; }
Example #29
Source File: POAManagerImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
synchronized void addPOA(POA poa) { // XXX This is probably not the correct error if (state.value() == State._INACTIVE) { POASystemException wrapper = factory.getWrapper(); throw wrapper.addPoaInactive( CompletionStatus.COMPLETED_NO ) ; } poas.add(poa); }
Example #30
Source File: POAManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public short getORTState() { switch (state.value()) { case State._HOLDING : return HOLDING.value ; case State._ACTIVE : return ACTIVE.value ; case State._INACTIVE : return INACTIVE.value ; case State._DISCARDING : return DISCARDING.value ; default : return NON_EXISTENT.value ; } }