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

x33g5p2x  于2022-01-24 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(128)

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

Lifecycle.removeLifecycleListener介绍

[英]Remove a LifecycleEvent listener from this component.
[中]从此组件中删除LifecycleEvent侦听器。

代码示例

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

@Override
public void removeLifecycleListener(final LifecycleListener listener) {
  if (delegate instanceof Lifecycle) {
    ((Lifecycle) delegate).removeLifecycleListener(listener);
  }
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat

source.removeLifecycleListener(this);

代码示例来源:origin: org.jboss.mod_cluster/mod_cluster

public void stop() throws JMException
{
 Server server = this.findServer();
 
 if (server != null)
 {
   if (!(server instanceof Lifecycle)) throw new IllegalStateException();
      Lifecycle lifecycle = (Lifecycle) server;
   lifecycle.removeLifecycleListener(this);
      if (this.init.get() && this.start.compareAndSet(true, false))
   {
    this.eventHandler.stop(new CatalinaServer(server, this.mbeanServer));
   }
      if (this.init.compareAndSet(true, false))
   {
    this.destroy(server);
   }
 }
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Gracefully terminate the active use of the public methods of this
 * component.  This method should be the last one called on a given
 * instance of this component.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that needs to be reported
 */
public void stop() throws LifecycleException {
  // Validate and update our current component state
  if (!started)
    throw new LifecycleException
      (MESSAGES.valveNotStarted());
  lifecycle.fireLifecycleEvent(STOP_EVENT, null);
  started = false;
  if (container instanceof Context) {
    ((Lifecycle) container).removeLifecycleListener(this);
  }
}

代码示例来源:origin: org.jboss.mod_cluster/mod_cluster

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

代码示例来源:origin: jboss.web/jbossweb

/**
 * Gracefully terminate the active use of the public methods of this
 * component.  This method should be the last one called on a given
 * instance of this component.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that needs to be reported
 */
public void stop() throws LifecycleException {
  // Validate and update our current component state
  if (!started)
    throw new LifecycleException
      (sm.getString("semaphoreValve.notStarted"));
  lifecycle.fireLifecycleEvent(STOP_EVENT, null);
  started = false;
  if (container instanceof Context) {
    ((Lifecycle) container).removeLifecycleListener(this);
  }
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat

if (container instanceof Lifecycle)
  ((Lifecycle) container).removeLifecycleListener(this);

代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat

lifecycle.removeLifecycleListener(listener);

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

if (container instanceof Host) {
  ((Lifecycle) child).removeLifecycleListener(this);
  ((Container) child).removePropertyChangeListener(this);

代码示例来源:origin: org.jboss.mod_cluster/mod_cluster

((Lifecycle) child).removeLifecycleListener(this);
((Container) child).removePropertyChangeListener(this);

代码示例来源:origin: jboss.web/jbossweb

((Lifecycle) context).removeLifecycleListener(this);
  mapper.removeContext(container.getName(), context.getName());
} else if (container instanceof Engine) {

代码示例来源:origin: org.jboss.web/jbossweb

((Lifecycle) context).removeLifecycleListener(this);
  mapper.removeContext(container.getName(), context.getName());
} else if (container instanceof Engine) {

代码示例来源:origin: jboss.web/jbossweb

Engine engine = (Engine) service.getContainer();
engine.removeContainerListener(this);
((Lifecycle) engine).removeLifecycleListener(this);
for (Container host : engine.findChildren()) {
  host.removeContainerListener(this);
  mapper.removeHost(host.getName());
  for (Container context : host.findChildren()) {
    ((Lifecycle) context).removeLifecycleListener(this);
    mapper.removeContext(host.getName(), context.getName());

代码示例来源:origin: org.jboss.web/jbossweb

Engine engine = (Engine) service.getContainer();
engine.removeContainerListener(this);
((Lifecycle) engine).removeLifecycleListener(this);
for (Container host : engine.findChildren()) {
  host.removeContainerListener(this);
  mapper.removeHost(host.getName());
  for (Container context : host.findChildren()) {
    ((Lifecycle) context).removeLifecycleListener(this);
    mapper.removeContext(host.getName(), context.getName());

相关文章