/** * {@inheritDoc} */ @Override public void stop(Deployable deployable, DeployableMonitor monitor) { stop(deployable); // Wait for the Deployable to be stopped DeployerWatchdog watchdog = new DeployerWatchdog(monitor); watchdog.setLogger(getLogger()); watchdog.watchForUnavailability(); }
/** * {@inheritDoc} */ @Override public void start(Deployable deployable, DeployableMonitor monitor) { start(deployable); // Wait for the Deployable to be started DeployerWatchdog watchdog = new DeployerWatchdog(monitor); watchdog.setLogger(getLogger()); watchdog.watchForAvailability(); }
/** * Casts the container and returns. * * @return Cast container. */ protected AbstractGlassFishInstalledLocalContainer getLocalContainer() { return (AbstractGlassFishInstalledLocalContainer) super.getContainer(); }
/** * {@inheritDoc} */ @Override public void redeploy(Deployable deployable, DeployableMonitor monitor) { this.redeploy(deployable); // Wait for the Deployable to be redeployed DeployerWatchdog watchdog = new DeployerWatchdog(monitor); watchdog.setLogger(getLogger()); watchdog.watchForAvailability(); }
/** * Test that the handling of ShouldDeployExpanded functions correctly. */ public void testShouldDeployExpanded() { AbstractCopyingInstalledLocalDeployer deployer = new TestableCopyingDeployer( createContainer(createContainerCapability(DeployableType.WAR), null)); assertTrue(deployer.shouldDeployExpanded(DeployableType.WAR)); deployer.setShouldDeployExpanded(DeployableType.WAR, true); assertTrue(deployer.shouldDeployExpanded(DeployableType.WAR)); deployer.setShouldDeployExpanded(DeployableType.WAR, false); assertFalse(deployer.shouldDeployExpanded(DeployableType.WAR)); deployer.setShouldDeployExpanded(DeployableType.WAR, true); assertTrue(deployer.shouldDeployExpanded(DeployableType.WAR)); }
/** * Replace the slashes with <code>#</code> in the deployable name (see: CARGO-1041). * {@inheritDoc} */ @Override protected String getDeployableName(Deployable deployable) { return super.getDeployableName(deployable).replace('/', '#'); } }
/** * Test if the <code>deploy</code> method can be called. */ public void testDeployMethodWithDeployableMonitorParameterCanBeCalled() { TestableAbstractRemoteDeployer deployer = new TestableAbstractRemoteDeployer( createContainer()); deployer.deploy(new WAR("some/file"), new DeployableMonitorStub("some/file")); }
/** * Wait till the monitored Deployable is made available or throw an exception if the timeout * period is reached. Equivalent to <code>watch(true)</code>. */ public void watchForAvailability() { watch(true); }
/** * Helper method to redeploy multiple deployables at a time. * @see Deployer#redeploy(Deployable) * @param deployables Deployables to redeploy. */ public void redeploy(List<Deployable> deployables) { for (Deployable deployable : deployables) { redeploy(deployable); } }
/** * {@inheritDoc} */ @Override public void stop(Deployable deployable) { super.stop(deployable); }
/** * {@inheritDoc} */ @Override public void start(Deployable deployable) { super.start(deployable); }
/** * @return the same value as {@link #getContainer()} but more type-safe. */ protected InstalledLocalContainer getInstalledContainer() { return (InstalledLocalContainer) super.getContainer(); }
/** * Helper method to deploy multiple deployables at a time. * @see Deployer#deploy(Deployable) * @param deployables Deployables to deploy. */ public void deploy(List<Deployable> deployables) { for (Deployable deployable : deployables) { deploy(deployable); } }
/** * @param container the container into which to perform deployment operations */ public AbstractDeployer(Container container) { setLogger(container.getLogger()); }
/** * {@inheritDoc} */ @Override public void redeploy(Deployable deployable, DeployableMonitor monitor) { this.redeploy(deployable); // Wait for the Deployable to be redeployed DeployerWatchdog watchdog = new DeployerWatchdog(monitor); watchdog.setLogger(getLogger()); watchdog.watchForAvailability(); }
/** * Wait till the monitored Deployable is made unavailable or throw an exception if the timeout * period is reached. Equivalent to <code>watch(false)</code>. */ public void watchForUnavailability() { watch(false); }
/** * Casts the container and returns. * * @return Cast container. */ protected AbstractGlassFishInstalledLocalContainer getLocalContainer() { return (AbstractGlassFishInstalledLocalContainer) super.getContainer(); }
/** * {@inheritDoc} */ @Override public void stop(Deployable deployable) { super.stop(deployable); }
/** * {@inheritDoc} */ @Override public void start(Deployable deployable) { super.start(deployable); }
/** * @return the same value as {@link #getContainer()} but more type-safe. */ protected InstalledLocalContainer getInstalledContainer() { return (InstalledLocalContainer) super.getContainer(); }