当前位置: 首页>>代码示例>>Java>>正文


Java State.ACTIVE属性代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:21,代码来源:POAManagerImpl.java

示例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 ) ;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:POAManagerImpl.java

示例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());
}
 
开发者ID:vilie,项目名称:javify,代码行数:18,代码来源:gnuPOAManager.java

示例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();
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:21,代码来源:gnuPOAManager.java

示例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());    
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:18,代码来源:gnuPOAManager.java

示例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();
    }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:21,代码来源:gnuPOAManager.java


注:本文中的org.omg.PortableServer.POAManagerPackage.State.ACTIVE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。