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

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

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

Container.addLifecycleListener介绍

暂无

代码示例

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

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

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

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

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

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

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

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

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

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

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

/**
 * Add a LifecycleEvent listener to this component.
 *
 * @param type ClassName of the listener to add
 * @throws MBeanException if adding the listener failed
*/
public void addLifecycleListener(String type) throws MBeanException{
  LifecycleListener listener = (LifecycleListener) newInstance(type);
  Container container = doGetManagedResource();
  container.addLifecycleListener(listener);
}

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

/**
 * Add a LifecycleEvent listener to this component.
 *
 * @param type ClassName of the listener to add
 * @throws MBeanException if adding the listener failed
*/
public void addLifecycleListener(String type) throws MBeanException{
  LifecycleListener listener = (LifecycleListener) newInstance(type);
  Container container = doGetManagedResource();
  container.addLifecycleListener(listener);
}

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

/**
 * Add a child Container, only if the proposed child is an implementation
 * of Context.
 *
 * @param child Child container to be added
 */
@Override
public void addChild(Container child) {
  child.addLifecycleListener(new MemoryLeakTrackingListener());
  if (!(child instanceof Context))
    throw new IllegalArgumentException
      (sm.getString("standardHost.notContext"));
  super.addChild(child);
}

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

/**
 * Add a child Container, only if the proposed child is an implementation
 * of Context.
 *
 * @param child Child container to be added
 */
@Override
public void addChild(Container child) {
  child.addLifecycleListener(new MemoryLeakTrackingListener());
  if (!(child instanceof Context))
    throw new IllegalArgumentException
      (sm.getString("standardHost.notContext"));
  super.addChild(child);
}

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

/**
 * Add a child Container, only if the proposed child is an implementation
 * of Context.
 *
 * @param child Child container to be added
 */
@Override
public void addChild(Container child) {
  child.addLifecycleListener(new MemoryLeakTrackingListener());
  if (!(child instanceof Context))
    throw new IllegalArgumentException
      (sm.getString("standardHost.notContext"));
  super.addChild(child);
}

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

/**
 * Add a child Container, only if the proposed child is an implementation
 * of Context.
 *
 * @param child Child container to be added
 */
@Override
public void addChild(Container child) {
  child.addLifecycleListener(new MemoryLeakTrackingListener());
  if (!(child instanceof Context))
    throw new IllegalArgumentException
      (sm.getString("standardHost.notContext"));
  super.addChild(child);
}

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

/**
 * Add a child Container, only if the proposed child is an implementation
 * of Context.
 *
 * @param child Child container to be added
 */
@Override
public void addChild(Container child) {
  child.addLifecycleListener(new MemoryLeakTrackingListener());
  if (!(child instanceof Context))
    throw new IllegalArgumentException
      (sm.getString("standardHost.notContext"));
  super.addChild(child);
}

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

/**
 * Add this mapper to the container and all child containers
 *
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 *
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 * 
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 *
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 * 
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 *
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 *
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

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

/**
 * Add this mapper to the container and all child containers
 * 
 * @param container
 */
private void addListeners(Container container) {
  container.addContainerListener(this);
  container.addLifecycleListener(this);
  for (Container child : container.findChildren()) {
    addListeners(child);
  }
}

相关文章

微信公众号

最新文章

更多