org.apache.catalina.Container.removeLifecycleListener()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.catalina.Container.removeLifecycleListener()方法的一些代码示例,展示了Container.removeLifecycleListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.removeLifecycleListener()方法的具体详情如下:
包路径:org.apache.catalina.Container
类名称:Container
方法名:removeLifecycleListener

Container.removeLifecycleListener介绍

暂无

代码示例

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Stop this component and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected synchronized void stopInternal() throws LifecycleException {
  setState(LifecycleState.STOPPING);
  if (container instanceof Context) {
    container.removeLifecycleListener(this);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Remove a LifecycleEvent listeners from this component.
 *
 * @param type The ClassName of the listeners to be removed.
 * Note that all the listeners having given ClassName will be removed.
 * @throws MBeanException propagated from the managed resource access
 */
public void removeLifecycleListeners(String type) throws MBeanException{
  Container container = doGetManagedResource();
  LifecycleListener[] listeners = container.findLifecycleListeners();
  for (LifecycleListener listener : listeners){
    if (listener.getClass().getName().equals(type)) {
      container.removeLifecycleListener(listener);
    }
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Remove a LifecycleEvent listeners from this component.
 *
 * @param type The ClassName of the listeners to be removed.
 * Note that all the listeners having given ClassName will be removed.
 * @throws MBeanException propagated from the managed resource access
 */
public void removeLifecycleListeners(String type) throws MBeanException{
  Container container = doGetManagedResource();
  LifecycleListener[] listeners = container.findLifecycleListeners();
  for (LifecycleListener listener : listeners){
    if (listener.getClass().getName().equals(type)) {
      container.removeLifecycleListener(listener);
    }
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
   * Remove this mapper from the container and all child containers
   *
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
   * Remove this mapper from the container and all child containers
   *
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
   * Remove this mapper from the container and all child containers
   *
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
   * Remove this mapper from the container and all child containers
   * 
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
   * Remove this mapper from the container and all child containers
   *
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
   * Remove this mapper from the container and all child containers
   * 
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
   * Remove this mapper from the container and all child containers
   *
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
   * Remove this mapper from the container and all child containers
   * 
   * @param container
   */
  private void removeListeners(Container container) {
    container.removeContainerListener(this);
    container.removeLifecycleListener(this);
    for (Container child : container.findChildren()) {
      removeListeners(child);
    }
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Remove a LifecycleEvent listeners from this component.
 *
 * @param type The ClassName of the listeners to be removed.
 * Note that all the listeners having given ClassName will be removed.
 */
public void removeLifecycleListeners(String type) throws MBeanException{
  Container container=null;
  try {
    container = (Container)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  LifecycleListener[] listeners = container.findLifecycleListeners();
  for(LifecycleListener listener: listeners){
    if(listener.getClass().getName().equals(type)){
      container.removeLifecycleListener(listener);
    }
  }
}

代码示例来源:origin: modcluster/mod_cluster

protected void removeListeners(Server server) {
  // Unregister ourself as a listener to child components
  for (Service service : server.findServices()) {
    Container engine = service.getContainer();
    engine.removeContainerListener(this);
    engine.removeLifecycleListener(this);
    for (Container host : engine.findChildren()) {
      host.removeContainerListener(this);
      for (Container context : host.findChildren()) {
        context.removeLifecycleListener(this);
        context.removePropertyChangeListener(this);
      }
    }
  }
}

代码示例来源:origin: modcluster/mod_cluster

@Override
  protected void removeListeners(Server server) {
    // Unregister ourself as a listener to child components
    for (Service service : server.findServices()) {
      Container engine = service.getContainer();
      engine.removeContainerListener(this);
      engine.removeLifecycleListener(this);

      for (Container host : engine.findChildren()) {
        host.removeContainerListener(this);

        for (Container context : host.findChildren()) {
          context.removeLifecycleListener(this);
          context.removePropertyChangeListener(this);
        }
      }
    }
  }
}

相关文章

微信公众号

最新文章

更多