本文整理了Java中org.apache.catalina.Container.removeContainerListener()
方法的一些代码示例,展示了Container.removeContainerListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.removeContainerListener()
方法的具体详情如下:
包路径:org.apache.catalina.Container
类名称:Container
方法名:removeContainerListener
[英]Remove a container event listener from this component.
[中]从此组件中删除容器事件侦听器。
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源: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: 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: codefollower/Tomcat-Research
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源: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.geronimo.ext.tomcat/catalina
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
protected void processContainerRemoveChild(Container parent,
Container child) {
if (log.isDebugEnabled())
log.debug("Process removeChild[parent=" + parent + ",child=" +
child + "]");
if (child instanceof Context) {
Context context = (Context) child;
context.removeLifecycleListener(this);
} else if (child instanceof Host || child instanceof Engine) {
child.removeContainerListener(this);
}
}
代码示例来源: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: 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: 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: 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);
}
}
}
}
}
代码示例来源:origin: modcluster/mod_cluster
@Test
public void destroyServer() throws Exception {
TomcatEventHandler handler = this.createEventHandler(this.eventHandler, this.provider, this.factory);
LifecycleServer server = mock(LifecycleServer.class);
LifecycleEvent event = createBeforeDestroyInitEvent(server);
handler.lifecycleEvent(event);
Mockito.verifyZeroInteractions(this.eventHandler);
this.initServer(handler, server);
Service service = mock(Service.class);
LifecycleEngine engine = mock(LifecycleEngine.class);
Container container = mock(Container.class);
LifecycleContainer childContainer = mock(LifecycleContainer.class);
when(server.findServices()).thenReturn(new Service[] { service });
when(service.getContainer()).thenReturn(engine);
when(engine.findChildren()).thenReturn(new Container[] { container });
when(container.findChildren()).thenReturn(new Container[] { childContainer });
handler.lifecycleEvent(event);
verify(engine).removeContainerListener(handler);
verify(engine).removeLifecycleListener(handler);
verify(container).removeContainerListener(handler);
verify(childContainer).removeLifecycleListener(handler);
verify(this.eventHandler).shutdown();
reset(this.eventHandler);
handler.lifecycleEvent(event);
Mockito.verifyZeroInteractions(this.eventHandler);
}
内容来源于网络,如有侵权,请联系作者删除!