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

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

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

Lifecycle.destroy介绍

[英]Prepare to discard the object. The following LifecycleEvents will be fired in the following order:

  1. DESTROY_EVENT: On the successful completion of component destruction.
    [中]准备丢弃该对象。以下生命周期事件将按以下顺序触发:
    1.销毁事件:组件销毁成功完成时。

代码示例

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

@Override
public void destroy() throws LifecycleException {
  if (delegate instanceof Lifecycle) {
    ((Lifecycle) delegate).destroy();
  }
}

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

/**
 * Ensure child Realms are destroyed when this Realm is destroyed.
 */
@Override
protected void destroyInternal() throws LifecycleException {
  for (Realm realm : realms) {
    if (realm instanceof Lifecycle) {
      ((Lifecycle) realm).destroy();
    }
  }
  super.destroyInternal();
}

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

/**
 * Ensure child Realms are destroyed when this Realm is destroyed.
 */
@Override
protected void destroyInternal() throws LifecycleException {
  for (Realm realm : realms) {
    if (realm instanceof Lifecycle) {
      ((Lifecycle) realm).destroy();
    }
  }
  super.destroyInternal();
}

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

@Override
public void destroy() throws LifecycleException {
  if (instance() != null && Lifecycle.class.isInstance(delegate)) {
    Lifecycle.class.cast(delegate).destroy();
  }
  state = LifecycleState.DESTROYED;
}

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

/**
 * Ensure child Realms are destroyed when this Realm is destroyed.
 */
@Override
protected void destroyInternal() throws LifecycleException {
  for (Realm realm : realms) {
    if (realm instanceof Lifecycle) {
      ((Lifecycle) realm).destroy();
    }
  }
  super.destroyInternal();
}

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

((Lifecycle) manager).destroy();
((Lifecycle) realm).destroy();
((Lifecycle) cluster).destroy();
((Lifecycle) loader).destroy();
((Lifecycle) pipeline).destroy();

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

@Override
protected void destroyInternal() throws LifecycleException {
  final Class<?> r = loadClass();
  if (r != null && Lifecycle.class.isAssignableFrom(r) && instance() != null) {
    Lifecycle.class.cast(instance()).destroy();
  }
}

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

((Lifecycle) manager).destroy();
((Lifecycle) realm).destroy();
((Lifecycle) cluster).destroy();
((Lifecycle) loader).destroy();
((Lifecycle) pipeline).destroy();

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

((Lifecycle) manager).destroy();
((Lifecycle) realm).destroy();
((Lifecycle) cluster).destroy();
((Lifecycle) logger).destroy();
((Lifecycle) loader).destroy();

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

((Lifecycle) manager).destroy();
((Lifecycle) realm).destroy();
((Lifecycle) cluster).destroy();
((Lifecycle) logger).destroy();
((Lifecycle) loader).destroy();

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

@Override
protected void destroyInternal() throws LifecycleException {
  Realm realm = getRealmInternal();
  if (realm instanceof Lifecycle) {
    ((Lifecycle) realm).destroy();
  }
  Cluster cluster = getClusterInternal();
  if (cluster instanceof Lifecycle) {
    ((Lifecycle) cluster).destroy();
  }
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  // If init fails, this may be null
  if (startStopExecutor != null) {
    startStopExecutor.shutdownNow();
  }
  super.destroyInternal();
}

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

@Override
protected void destroyInternal() throws LifecycleException {
  Realm realm = getRealmInternal();
  if ((realm != null) && (realm instanceof Lifecycle)) {
    ((Lifecycle) realm).destroy();
  }
  Cluster cluster = getClusterInternal();
  if ((cluster != null) && (cluster instanceof Lifecycle)) {
    ((Lifecycle) cluster).destroy();
  }
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  // If init fails, this may be null
  if (startStopExecutor != null) {
    startStopExecutor.shutdownNow();
  }
  super.destroyInternal();
}

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

@Override
protected void destroyInternal() throws LifecycleException {
  Realm realm = getRealmInternal();
  if (realm instanceof Lifecycle) {
    ((Lifecycle) realm).destroy();
  }
  Cluster cluster = getClusterInternal();
  if (cluster instanceof Lifecycle) {
    ((Lifecycle) cluster).destroy();
  }
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  // If init fails, this may be null
  if (startStopExecutor != null) {
    startStopExecutor.shutdownNow();
  }
  super.destroyInternal();
}

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

@Override
protected void destroyInternal() throws LifecycleException {
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  super.destroyInternal();
}

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

@Override
protected void destroyInternal() throws LifecycleException {
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  super.destroyInternal();
}

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

@Override
protected void destroyInternal() throws LifecycleException {
  // Stop the Valves in our pipeline (including the basic), if any
  if (pipeline instanceof Lifecycle) {
    ((Lifecycle) pipeline).destroy();
  }
  // Remove children now this container is being destroyed
  for (Container child : findChildren()) {
    removeChild(child);
  }
  // Required if the child is destroyed directly.
  if (parent != null) {
    parent.removeChild(this);
  }
  super.destroyInternal();
}

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

try {
  ((Lifecycle) oldManager).stop();
  ((Lifecycle) oldManager).destroy();
} catch (LifecycleException e) {
  log.error("StandardContext.setManager: stop-destroy: ", e);

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

try {
  ((Lifecycle) oldManager).stop();
  ((Lifecycle) oldManager).destroy();
} catch (LifecycleException e) {
  log.error(sm.getString("standardContext.setManager.stop"), e);

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

((Lifecycle) loader).destroy();
((Lifecycle) manager).destroy();

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

((Lifecycle) valve).destroy();
} catch (LifecycleException e) {
  log.error(sm.getString("standardPipeline.valve.destroy"), e);

相关文章