/** * @param container the container into which to perform deployment operations */ public AbstractDeployer(Container container) { setLogger(container.getLogger()); }
/** * Constructor. * * @param container Container to be monitored. */ public AbstractPingContainerMonitor(Container container) { super(container); httpUtils = new HttpUtils(); httpUtils.setLogger(container.getLogger()); }
/** * Constructor. * * @param container Container to be monitored. */ public AbstractContainerMonitor(Container container) { setLogger(container.getLogger()); if (container instanceof LocalContainer) { this.container = (LocalContainer) container; this.configuration = ((LocalContainer) container).getConfiguration(); } else { throw new CargoException("Container monitor is applicable just for local containers."); } }
/** * Waits until all deployables with a deployable monitor are deployed / undeployed. * * @param starting <code>true</code> if container is starting (i.e., wait for deployment), * <code>false</code> otherwise. */ protected void waitDeployableMonitor(boolean starting) { if (getConfiguration() != null && getConfiguration().getDeployables() != null) { for (DeployableElement deployableElement : getConfiguration().getDeployables()) { DeployableMonitor deployableMonitor = deployableElement.createDeployableMonitor(); if (deployableMonitor != null) { DeployerWatchdog watchdog = new DeployerWatchdog(deployableMonitor); watchdog.setLogger(container.getLogger()); deployableMonitor.setLogger(container.getLogger()); watchdog.watch(starting); } } } } }
/** * Waits until all deployables with a deployable monitor are deployed / undeployed. * * @param starting <code>true</code> if container is starting (i.e., wait for deployment), * <code>false</code> otherwise. */ protected void waitDeployableMonitor(boolean starting) { if (getConfiguration() != null && getConfiguration().getDeployables() != null) { for (DeployableElement deployableElement : getConfiguration().getDeployables()) { DeployableMonitor deployableMonitor = deployableElement.createDeployableMonitor(); if (deployableMonitor != null) { DeployerWatchdog watchdog = new DeployerWatchdog(deployableMonitor); watchdog.setLogger(container.getLogger()); deployableMonitor.setLogger(container.getLogger()); watchdog.watch(starting); } } } } }
installer.setLogger(getContainer().getLogger()); if (!installer.isAlreadyDownloaded())
installer.setLogger(getContainer().getLogger()); if (!installer.isAlreadyDownloaded())
/** * Set up a home dir (possibly using a ZipURLInstaller). */ protected void setupHome() { if (getHome() != null) { ((InstalledLocalContainer) getContainer()).setHome(getHome()); } else if (getZipURLInstaller() != null) { ZipURLInstaller installer = getZipURLInstaller().createInstaller(); installer.setLogger(getContainer().getLogger()); installer.install(); ((InstalledLocalContainer) getContainer()).setHome(installer.getHome()); } }
/** * Set up a home dir (possibly using a ZipURLInstaller). */ protected void setupHome() { if (getHome() != null) { ((InstalledLocalContainer) getContainer()).setHome(getHome()); } else if (getZipURLInstaller() != null) { ZipURLInstaller installer = getZipURLInstaller().createInstaller(); installer.setLogger(getContainer().getLogger()); installer.install(); ((InstalledLocalContainer) getContainer()).setHome(installer.getHome()); } }
org.codehaus.cargo.container.configuration.Configuration configuration = createConfiguration(); configuration.setLogger(container.getLogger());
this.logger = container.getLogger();
this.logger = container.getLogger();