/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * Remove an existing Service. * * @param name MBean Name of the component to remove * * @exception Exception if a component cannot be removed */ public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * Get Parent ContainerBase to add its child component * from child component's ObjectName as a String */ private ContainerBase getParentContainerFromChild(ObjectName oname) throws Exception { String hostName = oname.getKeyProperty("host"); String path = oname.getKeyProperty("path"); Service service = getService(oname); StandardEngine engine = (StandardEngine) service.getContainer(); if (hostName == null) { // child's container is Engine return engine; } else if (path == null) { // child's container is Host StandardHost host = (StandardHost) engine.findChild(hostName); return host; } else { // child's container is Context StandardHost host = (StandardHost) engine.findChild(hostName); path = getPathStr(path); StandardContext context = (StandardContext) host.findChild(path); return context; } }
/** * Get Parent ContainerBase to add its child component * from child component's ObjectName as a String */ private Container getParentContainerFromChild(ObjectName oname) throws Exception { String hostName = oname.getKeyProperty("host"); String path = oname.getKeyProperty("path"); Service service = getService(oname); Container engine = service.getContainer(); if (hostName == null) { // child's container is Engine return engine; } else if (path == null) { // child's container is Host Container host = engine.findChild(hostName); return host; } else { // child's container is Context Container host = engine.findChild(hostName); path = getPathStr(path); Container context = host.findChild(path); return context; } }
/** * Get Parent ContainerBase to add its child component * from child component's ObjectName as a String */ private ContainerBase getParentContainerFromChild(ObjectName oname) throws Exception { String hostName = oname.getKeyProperty("host"); String path = oname.getKeyProperty("path"); Service service = getService(oname); StandardEngine engine = (StandardEngine) service.getContainer(); if (hostName == null) { // child's container is Engine return engine; } else if (path == null) { // child's container is Host StandardHost host = (StandardHost) engine.findChild(hostName); return host; } else { // child's container is Context StandardHost host = (StandardHost) engine.findChild(hostName); path = getPathStr(path); StandardContext context = (StandardContext) host.findChild(path); return context; } }