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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.jboss.arquillian.core.api.InstanceProducer<org.wildfly.plugin.tools.server.ServerManager> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaDatadeploy(org.jboss.shrinkwrap.api.Archive<?> archive) voiddeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor) protected Torg.wildfly.plugin.tools.ContainerDescriptionReturns a description for the running container.org.jboss.arquillian.container.spi.client.protocol.ProtocolDescriptionprotected ManagementClientprotected org.jboss.as.controller.client.ModelControllerClientprotected 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.voidfinal voidstart()protected abstract voidfinal voidstop()final voidprotected abstract voidstopInternal(Integer timeout) voidundeploy(org.jboss.shrinkwrap.api.Archive<?> archive) voidundeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor descriptor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.arquillian.container.spi.client.container.DeployableContainer
getConfigurationClass, getConfigurationMapper
-
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:
getDefaultProtocolin interfaceorg.jboss.arquillian.container.spi.client.container.DeployableContainer<T extends CommonContainerConfiguration>
-
setup
- 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 org.wildfly.plugin.tools.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
-
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 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 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
-