Class CommonDeployableContainer<T extends CommonContainerConfiguration>

java.lang.Object
org.jboss.as.arquillian.container.CommonDeployableContainer<T>
All Implemented Interfaces:
org.jboss.arquillian.container.spi.client.container.DeployableContainer<T>
Direct Known Subclasses:
CommonManagedDeployableContainer

public abstract class CommonDeployableContainer<T extends CommonContainerConfiguration> extends Object implements org.jboss.arquillian.container.spi.client.container.DeployableContainer<T>
A JBossAS deployable container
Since:
17-Nov-2010
Author:
Thomas.Diesler@jboss.com
  • Field Details

    • serverManagerProducer

      @Inject @ContainerScoped protected org.jboss.arquillian.core.api.InstanceProducer<org.wildfly.plugin.tools.server.ServerManager> serverManagerProducer
  • Constructor Details

    • CommonDeployableContainer

      public CommonDeployableContainer()
  • Method Details

    • getDefaultProtocol

      public org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription getDefaultProtocol()
      Specified by:
      getDefaultProtocol in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
    • setup

      public void setup(T config)
      Specified by:
      setup in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
    • start

      public final void start() throws org.jboss.arquillian.container.spi.client.container.LifecycleException
      Specified by:
      start in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.LifecycleException
    • startInternal

      protected abstract void startInternal() throws org.jboss.arquillian.container.spi.client.container.LifecycleException
      Throws:
      org.jboss.arquillian.container.spi.client.container.LifecycleException
    • stop

      public final void stop() throws org.jboss.arquillian.container.spi.client.container.LifecycleException
      Specified by:
      stop in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.LifecycleException
    • stop

      public final void stop(Integer timeout) throws org.jboss.arquillian.container.spi.client.container.LifecycleException
      Throws:
      org.jboss.arquillian.container.spi.client.container.LifecycleException
    • stopInternal

      protected abstract void stopInternal(Integer timeout) throws org.jboss.arquillian.container.spi.client.container.LifecycleException
      Throws:
      org.jboss.arquillian.container.spi.client.container.LifecycleException
    • getContainerDescription

      public org.wildfly.plugin.tools.ContainerDescription getContainerDescription()
      Returns a description for the running container. If the container has not been started null will be returned.
      Returns:
      the description for the running container or null if the container has not yet been started
    • getContainerConfiguration

      protected T getContainerConfiguration()
    • getManagementClient

      protected ManagementClient getManagementClient()
    • getModelControllerClient

      protected org.jboss.as.controller.client.ModelControllerClient getModelControllerClient()
    • isOperationAttributeSupported

      protected boolean isOperationAttributeSupported(String operationName, String attributeName) throws IOException
      Checks to see if the attribute is a valid attribute for the operation. This is useful to determine if the running container supports an attribute for the version running.

      This is the same as executing isOperationAttriubuteSupported(null, operationName, attributeName)

      Parameters:
      operationName - the operation name
      attributeName - the attribute name
      Returns:
      true if the attribute is supported or false if the attribute was not found on the operation description
      Throws:
      IOException - if an error occurs while attempting to execute the operation
      IllegalStateException - if the operation fails
    • isOperationAttributeSupported

      protected boolean isOperationAttributeSupported(org.jboss.dmr.ModelNode address, String operationName, String attributeName) throws IOException
      Checks to see if the attribute is a valid attribute for the operation. This is useful to determine if the running container supports an attribute for the version running.
      Parameters:
      address - the address or null for the root resource
      operationName - the operation name
      attributeName - the attribute name
      Returns:
      true if the attribute is supported or false if the attribute was not found on the operation description
      Throws:
      IOException - if an error occurs while attempting to execute the operation
      IllegalStateException - if the operation fails
    • deploy

      public org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData deploy(org.jboss.shrinkwrap.api.Archive<?> archive) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
      Specified by:
      deploy in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.DeploymentException
    • undeploy

      public void undeploy(org.jboss.shrinkwrap.api.Archive<?> archive) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
      Specified by:
      undeploy in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.DeploymentException
    • deploy

      public void deploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
      Specified by:
      deploy in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.DeploymentException
    • undeploy

      public void undeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
      Specified by:
      undeploy in interface org.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
      Throws:
      org.jboss.arquillian.container.spi.client.container.DeploymentException