MCPcopy Create free account
hub / github.com/apache/tomcat / removeHost

Method removeHost

java/org/apache/catalina/mbeans/MBeanFactory.java:750–763  ·  view source on GitHub ↗

Remove an existing Host. @param name MBean Name of the component to remove @exception Exception if a component cannot be removed

(String name)

Source from the content-addressed store, hash-verified

748 * @exception Exception if a component cannot be removed
749 */
750 public void removeHost(String name) throws Exception {
751
752 // Acquire a reference to the component to be removed
753 ObjectName oname = new ObjectName(name);
754 String hostName = oname.getKeyProperty("host");
755 Service service = getService(oname);
756 Engine engine = service.getContainer();
757 Host host = (Host) engine.findChild(hostName);
758
759 // Remove this component from its parent component
760 if (host != null) {
761 engine.removeChild(host);
762 }
763 }
764
765
766 /**

Callers

nothing calls this directly

Calls 4

getServiceMethod · 0.95
getContainerMethod · 0.95
findChildMethod · 0.65
removeChildMethod · 0.65

Tested by

no test coverage detected