Class ArchiveDeployer


  • public class ArchiveDeployer
    extends Object
    Allows deployment operations to be executed on a running server.

    The client is not closed by an instance of this and is the responsibility of the user to clean up the client instance.

    Since:
    17-Nov-2010
    Author:
    Thomas.Diesler@jboss.com, James R. Perkins
    • Constructor Detail

      • ArchiveDeployer

        @Deprecated
        public ArchiveDeployer​(org.jboss.as.controller.client.helpers.domain.DomainDeploymentManager deploymentManager)
        Deprecated.
        the DomainDeploymentManager will no longer be used in future releases, use the ArchiveDeployer(ManagementClient) constructor
        Creates a new deployer.
        Parameters:
        deploymentManager - the deployment manager to use
        See Also:
        ArchiveDeployer(ManagementClient)
      • ArchiveDeployer

        public ArchiveDeployer​(ManagementClient client)
        Creates a new deployer.
        Parameters:
        client - the client used to communicate with the server
    • Method Detail

      • deploy

        public String deploy​(org.jboss.shrinkwrap.api.Archive<?> archive,
                             String serverGroup)
                      throws org.jboss.arquillian.container.spi.client.container.DeploymentException
        Deploys the archive to the server group.
        Parameters:
        archive - the archive to deploy
        serverGroup - the server group to deploy to
        Returns:
        a unique identifier for the deployment
        Throws:
        org.jboss.arquillian.container.spi.client.container.DeploymentException - if an error occurs during deployment
      • deploy

        public String deploy​(org.jboss.shrinkwrap.api.Archive<?> archive,
                             Set<String> serverGroups)
                      throws org.jboss.arquillian.container.spi.client.container.DeploymentException
        Deploys the archive to multiple server groups.
        Parameters:
        archive - the archive to deploy
        serverGroups - the server groups to deploy to
        Returns:
        a unique identifier for the deployment
        Throws:
        org.jboss.arquillian.container.spi.client.container.DeploymentException - if an error occurs during deployment
      • undeploy

        public void undeploy​(String runtimeName,
                             String serverGroup)
                      throws org.jboss.arquillian.container.spi.client.container.DeploymentException
        Undeploys the content specified by the runtimeName from the server group.
        Parameters:
        runtimeName - the name of the deployment
        serverGroup - the server group to undeploy to
        Throws:
        org.jboss.arquillian.container.spi.client.container.DeploymentException - if an error occurs during undeployment
      • undeploy

        public void undeploy​(String runtimeName,
                             Set<String> serverGroups)
                      throws org.jboss.arquillian.container.spi.client.container.DeploymentException
        Undeploys the content specified by the runtimeName from the server groups.
        Parameters:
        runtimeName - the name of the deployment
        serverGroups - the server groups to undeploy to
        Throws:
        org.jboss.arquillian.container.spi.client.container.DeploymentException - if an error occurs during undeployment
      • hasDeployment

        public boolean hasDeployment​(String name)
                              throws IOException
        Checks if the deployment content is on the server.
        Parameters:
        name - the name of the deployment
        Returns:
        true if the deployment content exists otherwise false
        Throws:
        IOException - if a failure occurs communicating with the server
      • hasDeployment

        public boolean hasDeployment​(String name,
                                     String serverGroup)
                              throws IOException
        Checks if the deployment content is on the server.
        Parameters:
        name - the name of the deployment
        serverGroup - the server group to check for the deployment on
        Returns:
        true if the deployment content exists otherwise false
        Throws:
        IOException - if a failure occurs communicating with the server