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
-
-
Constructor Summary
Constructors Constructor Description CommonDeployableContainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaDatadeploy(org.jboss.shrinkwrap.api.Archive<?> archive)voiddeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor)protected TgetContainerConfiguration()ContainerDescriptiongetContainerDescription()Returns a description for the running container.org.jboss.arquillian.container.spi.client.protocol.ProtocolDescriptiongetDefaultProtocol()protected ManagementClientgetManagementClient()protected org.jboss.as.controller.client.ModelControllerClientgetModelControllerClient()protected booleanisOperationAttributeSupported(String operationName, String attributeName)Checks to see if the attribute is a valid attribute for the operation.protected booleanisOperationAttributeSupported(org.jboss.dmr.ModelNode address, String operationName, String attributeName)Checks to see if the attribute is a valid attribute for the operation.voidsetup(T config)voidstart()protected abstract voidstartInternal()voidstop()voidstop(Integer timeout)protected abstract voidstopInternal(Integer timeout)voidundeploy(org.jboss.shrinkwrap.api.Archive<?> archive)voidundeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor)
-
-
-
Method Detail
-
getDefaultProtocol
public org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription getDefaultProtocol()
- Specified by:
getDefaultProtocolin interfaceorg.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
-
setup
public void setup(T config)
- Specified by:
setupin interfaceorg.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:
startin interfaceorg.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:
stopin interfaceorg.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 ContainerDescription getContainerDescription()
Returns a description for the running container. If the container has not been startednullwill be returned.- Returns:
- the description for the running container or
nullif 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 nameattributeName- the attribute name- Returns:
trueif the attribute is supported orfalseif the attribute was not found on the operation description- Throws:
IOException- if an error occurs while attempting to execute the operationIllegalStateException- if the operation fails
-
isOperationAttributeSupported
protected boolean isOperationAttributeSupported(org.jboss.dmr.ModelNode address, String operationName, String attributeName) throws IOExceptionChecks 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 ornullfor the root resourceoperationName- the operation nameattributeName- the attribute name- Returns:
trueif the attribute is supported orfalseif the attribute was not found on the operation description- Throws:
IOException- if an error occurs while attempting to execute the operationIllegalStateException- 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:
deployin interfaceorg.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:
undeployin interfaceorg.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:
deployin interfaceorg.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:
undeployin interfaceorg.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>- Throws:
org.jboss.arquillian.container.spi.client.container.DeploymentException
-
-