@SuppressWarnings("unused") public void afterSetup(@Observes final AfterSetup event) throws Exception { this.container = (WildFlySwarmContainer) event.getDeployableContainer(); }
public void undeployPortal(@Observes BeforeStop beforeStopEvent) throws DeploymentException { for (Archive<?> archive : deployments) { beforeStopEvent.getDeployableContainer().undeploy(archive); } } }
@Override public void stop() throws LifecycleException { event.fire(new BeforeStop(deployableContainer)); try { deployableContainer.stop(); setState(Container.State.STOPPED); } catch (LifecycleException e) { setState(State.STOPPED_FAILED); failureCause = e; throw e; } event.fire(new AfterStop(deployableContainer)); }
public Void call() throws Exception { for (Deployment d : suiteDeploymentScenario.deployments()) { deploymentEvent.fire(new DeployDeployment(findContainer(registry, event.getDeployableContainer()), d)); } return null; } });
@Override public void start() throws LifecycleException { event.fire(new BeforeStart(deployableContainer)); try { deployableContainer.start(); setState(Container.State.STARTED); } catch (LifecycleException e) { setState(State.STARTED_FAILED); failureCause = e; throw e; } event.fire(new AfterStart(deployableContainer)); }
@Test public void shouldHandleNoConfigurationInContext() throws Exception { fire(new BeforeDeploy(deployableContainer, deployment)); fileShouldExist(false); }
@Test public void shouldStopAndDestroyCubeDuringAfterStop() { fire(new AfterStop(deployableContainer)); assertEventFired(StopCube.class, 1); assertEventFired(DestroyCube.class, 1); }
@Override public void kill() throws Exception { event.fire(new BeforeKill(deployableContainer)); try { getServerKillProcessor().kill(this); setState(Container.State.KILLED); } catch (Exception e) { setState(State.KILLED_FAILED); failureCause = e; throw e; } event.fire(new AfterKill(deployableContainer)); }
@Test public void shouldCreateAndStartCubeDuringBeforeStart() { fire(new BeforeStart(deployableContainer)); assertEventFired(CreateCube.class, 1); assertEventFired(StartCube.class, 1); }
@Override public void stop() throws LifecycleException { event.fire(new BeforeStop(deployableContainer)); try { deployableContainer.stop(); setState(Container.State.STOPPED); } catch (LifecycleException e) { setState(State.STOPPED_FAILED); failureCause = e; throw e; } event.fire(new AfterStop(deployableContainer)); }
public void undeployPortal(@Observes BeforeStop beforeStopEvent) throws DeploymentException { for (Archive<?> archive : deployments) { beforeStopEvent.getDeployableContainer().undeploy(archive); } } }
@SuppressWarnings("unused") public void afterSetup(@Observes final AfterSetup event) throws Exception { this.container = (WildFlySwarmContainer) event.getDeployableContainer(); }
@Override public void start() throws LifecycleException { event.fire(new BeforeStart(deployableContainer)); try { deployableContainer.start(); setState(Container.State.STARTED); } catch (LifecycleException e) { setState(State.STARTED_FAILED); failureCause = e; throw e; } event.fire(new AfterStart(deployableContainer)); }
@Test public void shouldNotExportIfDeploymentExportPathNotSet() throws Exception { bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class)); fire(new BeforeDeploy(deployableContainer, deployment)); fileShouldExist(false); }
@Test public void shouldNotStopAndDestroyWhenNoContainerFound() { fire(new AfterStop(deployableContainerNoMatch)); assertEventFired(StopCube.class, 0); assertEventFired(DestroyCube.class, 0); }
@Override public void kill() throws Exception { event.fire(new BeforeKill(deployableContainer)); try { getServerKillProcessor().kill(this); setState(Container.State.KILLED); } catch (Exception e) { setState(State.KILLED_FAILED); failureCause = e; throw e; } event.fire(new AfterKill(deployableContainer)); }
@Test public void shouldNotCreateAndStartWhenNoContainerFound() { fire(new BeforeStart(deployableContainerNoMatch)); assertEventFired(CreateCube.class, 0); assertEventFired(StartCube.class, 0); }
@Override public void perform(Container container) throws Exception { event.fire(new BeforeStop(container.getDeployableContainer())); try { if (container.getState().equals(Container.State.STARTED)) { CommonDeployableContainer c = (CommonDeployableContainer) container.getDeployableContainer(); c.stop(stopEvent.getTimeout()); } container.setState(Container.State.STOPPED); } catch (LifecycleException e) { container.setState(Container.State.STOPPED_FAILED); throw e; } event.fire(new AfterStop(container.getDeployableContainer())); } });
public Void call() throws Exception { for (Deployment d : suiteDeploymentScenario.deployments()) { deploymentEvent.fire(new UnDeployDeployment(findContainer(registry, event.getDeployableContainer()), d)); } return null; } });
public void executeAfterSetup(@Observes AfterSetup event){ deployableContainer = event.getDeployableContainer(); }