本文整理了Java中org.apache.catalina.Engine.removeChild()
方法的一些代码示例,展示了Engine.removeChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Engine.removeChild()
方法的具体详情如下:
包路径:org.apache.catalina.Engine
类名称:Engine
方法名:removeChild
暂无
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
public void removeHost(Host host) {
engine.removeChild(host);
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
private void removeHost(ObjectRetriever objRetriever) {
Host host = (Host)objRetriever.getInternalObject();
engine.removeChild(host);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Remove an existing Host.
*
* @param name MBean Name of the component to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
engine.removeChild(host);
}
}
代码示例来源:origin: tomcat/catalina
/**
* Remove an existing Host.
*
* @param name MBean Name of the comonent to remove
*
* @exception Exception if a component cannot be removed
*/
public void removeHost(String name) throws Exception {
// Acquire a reference to the component to be removed
ObjectName oname = new ObjectName(name);
String hostName = oname.getKeyProperty("host");
Service service = getService(oname);
Engine engine = (Engine) service.getContainer();
Host host = (Host) engine.findChild(hostName);
// Remove this component from its parent component
if(host!=null) {
if(host instanceof StandardHost)
((StandardHost)host).destroy();
else
engine.removeChild(host);
}
}
代码示例来源:origin: Red5/red5-plugins
engine.removeChild(host);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
engine.removeChild(child);
if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy();
} catch (Exception e) {
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
engine.removeChild(child);
if ( child instanceof ContainerBase ) child.destroy();
} catch (Exception e) {
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
engine.removeChild(child);
if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy();
} catch (Exception e) {
代码示例来源:origin: codefollower/Tomcat-Research
engine.removeChild(child);
if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy();
} catch (Exception e) {
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
engine.removeChild(child);
if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy();
} catch (Exception e) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
engine.removeChild(child);
if ( child instanceof ContainerBase ) ((ContainerBase)child).destroy();
} catch (Exception e) {
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
engine.removeChild(child);
if ( child instanceof ContainerBase ) child.destroy();
} catch (Exception e) {
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.url.mapper.clustermessage
public static void removeVirtualHost(String hostName) {
Engine engine = DataHolder.getInstance().getCarbonTomcatService().getTomcat().getEngine();
Host host = (Host) engine.findChild(hostName);
Context context = (Context) host.findChild("/");
try {
if (host.getState().isAvailable()) {
if (context != null && context.getAvailable()) {
context.setRealm(null);
context.stop();
context.destroy();
log.info("Unloaded webapp from the host: " + host
+ " as the context of: " + context);
}
host.removeChild(context);
host.setRealm(null);
host.stop();
host.destroy();
engine.removeChild(host);
}
}catch (LifecycleException e) {
log.error("error while removing host from tomcat", e);
}
URLMappingHolder.getInstance().removeUrlMappingMap(
host.getName());
log.info("Unloaded host from the engine: " + host);
}
public static Host addHostToEngine(String hostName) {
内容来源于网络,如有侵权,请联系作者删除!