public class ArchiveDeployer extends Object
The client is not closed by an instance of this and is the responsibility of the user to clean up the client instance.
| Constructor and Description |
|---|
ArchiveDeployer(ManagementClient client)
Creates a new deployer for deploying archives.
|
ArchiveDeployer(org.jboss.as.controller.client.ModelControllerClient modelControllerClient)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
deploy(org.jboss.shrinkwrap.api.Archive<?> archive)
Deploys the archive to a running container.
|
String |
deploy(String name,
InputStream input)
Deploys the archive to a running container.
|
boolean |
hasDeployment(String name)
Checks if the deployment content is on the server.
|
void |
undeploy(String runtimeName)
Removes an archive from the running container.
|
void |
undeploy(String runtimeName,
boolean failOnMissing)
Removes an archive from the running container.
|
@Deprecated public ArchiveDeployer(org.jboss.as.controller.client.ModelControllerClient modelControllerClient)
ArchiveDeployer(ManagementClient)Using this constructor the state of the client connection cannot be validated. This could produce unexpected results if the client is closed and there's an attempt to use an instance of this type.
modelControllerClient - the model controller to usepublic ArchiveDeployer(ManagementClient client)
client - the management client to usepublic String deploy(org.jboss.shrinkwrap.api.Archive<?> archive) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
archive - the archive to deployorg.jboss.arquillian.container.spi.client.container.DeploymentException - if an error happens during deploymentIllegalStateException - if the client has been closedpublic String deploy(String name, InputStream input) throws org.jboss.arquillian.container.spi.client.container.DeploymentException
name - the runtime for the deploymentinput - the input stream of a deployment archiveorg.jboss.arquillian.container.spi.client.container.DeploymentException - if an error happens during deploymentIllegalStateException - if the client has been closedpublic void undeploy(String runtimeName)
All exceptions are caught and logged as a warning. Errors will still be thrown however.
runtimeName - the runtime name for the deploymentpublic void undeploy(String runtimeName, boolean failOnMissing)
All exceptions are caught and logged as a warning. Errors will still be thrown however.
runtimeName - the runtime name for the deploymentfailOnMissing - true if the undeploy should fail if the deployment was not found on the server,
false if the deployment does not exist and the undeploy should be ignoredpublic boolean hasDeployment(String name) throws IOException
name - the name of the deploymenttrue if the deployment content exists otherwise falseIOException - if a failure occurs communicating with the serverCopyright © 2022 JBoss by Red Hat. All rights reserved.