本文整理汇总了Java中org.omg.PortableServer.POAManagerPackage.State.ACTIVE属性的典型用法代码示例。如果您正苦于以下问题:Java State.ACTIVE属性的具体用法?Java State.ACTIVE怎么用?Java State.ACTIVE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.omg.PortableServer.POAManagerPackage.State
的用法示例。
在下文中一共展示了State.ACTIVE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: activate
/**
* This operation changes the POA manager to ACTIVE.
*
* @exception org.omg.PortableServer.POAManagerPackage.AdapterInactive
* If POA manager state is INACTIVE.
*/
public void activate()
throws org.omg.PortableServer.POAManagerPackage.AdapterInactive
{
// State change -> ACTIVE
synchronized (m_state_mutex) {
if (m_state == State.INACTIVE) {
throw new AdapterInactive();
}
if (m_state != State.ACTIVE) {
m_completion.stopWaiting();
m_state = State.ACTIVE;
m_state_mutex.notifyAll();
}
}
}
示例2: activate
/**
* <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 ) ;
}
}
}
示例3: activate
/**
* Turns the associated POAs into active state, allowing them to receive
* and process requests.
*
* @throws AdapterInactive if the POAs are in the inactive state.
* If once inactivated, the POA cannot be activated again. This
* method can only be called to leave the holding or discarding state.
*/
public void activate()
throws AdapterInactive
{
if (state != State.INACTIVE)
state = State.ACTIVE;
else
throw new AdapterInactive();
notifyInterceptors(state.value());
}
示例4: waitForIdle
/**
* Suspend the current thread while at least one of the associated POA is
* actively processing some requests. The method assumes that the POAs
* are not accepting the <i>new</i> requests due manager state.
*
* @throws BAD_INV_ORDER if the POAs are in the active state.
*/
public void waitForIdle()
{
if (state == State.ACTIVE)
throw new BAD_INV_ORDER("The state is active");
gnuPOA poa;
Iterator iter = POAs.iterator();
while (iter.hasNext())
{
poa = (gnuPOA) iter.next();
poa.waitWhileRunning();
}
}
示例5: activate
/**
* Turns the associated POAs into active state, allowing them to receive
* and process requests.
*
* @throws AdapterInactive if the POAs are in the inactive state.
* If once inactivated, the POA cannot be activated again. This
* method can only be called to leave the holding or discarding state.
*/
public void activate()
throws AdapterInactive
{
if (state != State.INACTIVE)
state = State.ACTIVE;
else
throw new AdapterInactive();
notifyInterceptors(state.value());
}
示例6: waitForIdle
/**
* Suspend the current thread while at least one of the associated POA is
* actively processing some requests. The method assumes that the POAs
* are not accepting the <i>new</i> requests due manager state.
*
* @throws BAD_INV_ORDER if the POAs are in the active state.
*/
public void waitForIdle()
{
if (state == State.ACTIVE)
throw new BAD_INV_ORDER("The state is active");
gnuPOA poa;
Iterator iter = POAs.iterator();
while (iter.hasNext())
{
poa = (gnuPOA) iter.next();
poa.waitWhileRunning();
}
}