/** Stop the archive. */ public boolean stop(String name) { DeployController<?> controller = getDeployContainer().findController(keyToName(name)); if (controller == null) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, L.l("unknown name '{0}'", name)); if (log.isLoggable(Level.FINER)) log.log(Level.FINER, L.l("known names are {0}", getNamesAsString())); return false; } controller.stop(); return true; }
/** Start the archive. */ public boolean start(String name) { DeployController<?> controller = getDeployContainer().findController(keyToName(name)); if (controller == null) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, L.l("{0} unknown name '{1}' in start", this, name)); if (log.isLoggable(Level.FINER)) log.log(Level.FINER, L.l("{0} known names are {1} in start", this, getNamesAsString())); return false; } controller.start(); return true; }
/** Undeploy the archive. */ public boolean undeploy(String name) { DeployController<?> controller = getDeployContainer().findController(keyToName(name)); if (controller == null) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, L.l("unknown name '{0}'", name)); if (log.isLoggable(Level.FINER)) log.log(Level.FINER, L.l("known names are {0}", getNamesAsString())); return false; } Path archivePath = getArchivePath(name); Path expandPath = getExpandPath(name); controller.stop(); try { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, L.l("deleting {0}", archivePath)); archivePath.removeAll(); } catch (IOException ex) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, ex.toString(), ex); } try { if (expandPath != null) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, L.l("deleting {0}", expandPath)); expandPath.removeAll(); } } catch (IOException ex) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, ex.toString(), ex); } getDeployContainer().update(keyToName(name)); return true; }