public interface DeploymentManager
The server result for each deployment operation will be the result of a composite operation.
If the server is a managed domain server groups are required. If
the server is a standalone server no server groups are allowed to be define. A failed DeploymentResult
will be returned if the server groups are empty for a managed domain or populated for a standalone server.
Modifier and Type | Interface and Description |
---|---|
static class |
DeploymentManager.Factory
A factory to create a new deployment manager
|
Modifier and Type | Method and Description |
---|---|
DeploymentResult |
deploy(Deployment deployment)
Deploys the content to the server.
|
DeploymentResult |
deploy(Set<Deployment> deployments)
Deploys the content of each deployment to the server.
|
DeploymentResult |
deployToRuntime(DeploymentDescription deployment)
Deploys existing deployment content to the runtime.
|
DeploymentResult |
deployToRuntime(Set<DeploymentDescription> deployments)
Deploys existing deployment content to the runtime for each deployment description.
|
DeploymentResult |
forceDeploy(Deployment deployment)
Deploys the content to the server if it does not already exist on the server.
|
DeploymentResult |
forceDeploy(Set<Deployment> deployments)
Deploys the content to the server if it does not already exist on the server.
|
Set<String> |
getDeploymentNames()
Returns the names of deployed content.
|
Set<DeploymentDescription> |
getDeployments()
Returns the available deployments.
|
Set<DeploymentDescription> |
getDeployments(String serverGroup)
Returns all the deployments on the specified server-group.
|
boolean |
hasDeployment(String name)
Checks if the deployment content is on the server.
|
boolean |
hasDeployment(String name,
String serverGroup)
Checks if the deployment content is on the server.
|
boolean |
isEnabled(String name)
Checks if the deployment has been deployed to the runtime.
|
boolean |
isEnabled(String name,
String serverGroup)
Checks if the deployment has been deployed to the runtime.
|
DeploymentResult |
redeploy(Deployment deployment)
Redeploys the content to the server.
|
DeploymentResult |
redeploy(Set<Deployment> deployments)
Redeploys the content to the server.
|
DeploymentResult |
redeployToRuntime(DeploymentDescription deployment)
Redeploys existing deployment content to the runtime.
|
DeploymentResult |
redeployToRuntime(Set<DeploymentDescription> deployments)
Redeploys existing deployment content to the runtime for each deployment description.
|
DeploymentResult |
undeploy(Set<UndeployDescription> undeployDescriptions)
Undeploys the deployment from the server.
|
DeploymentResult |
undeploy(UndeployDescription undeployDescription)
Undeploys the deployment from the server.
|
DeploymentResult deploy(Deployment deployment) throws IOException
If the deployment is not enabled a deploy
operation will
need to be invoked. This can also be achieved by invoking the deployToRuntime(DeploymentDescription)
method.
deployment
- the deployment to deployIOException
- if a failure occurs communicating with the serverdeployToRuntime(DeploymentDescription)
DeploymentResult deploy(Set<Deployment> deployments) throws IOException
If the deployment is not enabled a deploy
operation will
need to be invoked. This can also be achieved by invoking the deployToRuntime(Set)
method.
Also note that it is safe to trigger a deploy
operation on already deployed deployments.
deployments
- a set of deployments to deployIOException
- if a failure occurs communicating with the serverdeployToRuntime(Set)
DeploymentResult forceDeploy(Deployment deployment) throws IOException
If the deployment is not enabled a deploy
operation will
need to be invoked. This can also be achieved by invoking the deployToRuntime(DeploymentDescription)
method.
deployment
- the deployment to deployIOException
- if a failure occurs communicating with the serverdeployToRuntime(DeploymentDescription)
DeploymentResult forceDeploy(Set<Deployment> deployments) throws IOException
If the deployment is not enabled a deploy
operation will
need to be invoked. This can also be achieved by invoking the deployToRuntime(Set)
method.
Also note that it is safe to trigger a deploy
operation on already deployed deployments.
deployments
- a set of deployments to deployIOException
- if a failure occurs communicating with the serverdeployToRuntime(Set)
DeploymentResult deployToRuntime(DeploymentDescription deployment) throws IOException
deployment
- the deployment description to deployIOException
- if a failure occurs communicating with the serverDeploymentResult deployToRuntime(Set<DeploymentDescription> deployments) throws IOException
deployments
- the deployment descriptions to deployIOException
- if a failure occurs communicating with the serverDeploymentResult redeploy(Deployment deployment) throws IOException
full-replace-deployment
operation to upload the new content,
undeploy the old content, deploy the new content and then remove the old content.
If the deployment is not enabled a deploy
or redeploy
operation will need to be invoked. This can also be achieved by invoking the
deployToRuntime(DeploymentDescription)
method or the redeployToRuntime(DeploymentDescription)
method.
deployment
- the deployment to redeployIOException
- if a failure occurs communicating with the serverredeployToRuntime(DeploymentDescription)
DeploymentResult redeploy(Set<Deployment> deployments) throws IOException
full-replace-deployment
operation to upload the new content,
undeploy the old content, deploy the new content and then remove the old content.
If the deployment is not enabled a deploy
or redeploy
operation will need to be invoked. This can also be achieved by invoking the deployToRuntime(Set)
method or the redeployToRuntime(Set)
method.
Also note that it is safe to trigger a deploy
or operation on already deployed deployments.
deployments
- a set of deployments to redeployIOException
- if a failure occurs communicating with the serverredeployToRuntime(Set)
DeploymentResult redeployToRuntime(DeploymentDescription deployment) throws IOException
deployment
- the deployment description to redeployIOException
- if a failure occurs communicating with the serverDeploymentResult redeployToRuntime(Set<DeploymentDescription> deployments) throws IOException
deployments
- the deployment descriptions to redeployIOException
- if a failure occurs communicating with the serverDeploymentResult undeploy(UndeployDescription undeployDescription) throws IOException
undeployDescription
- the description for undeploying the contentIOException
- if a failure occurs communicating with the serverDeploymentResult undeploy(Set<UndeployDescription> undeployDescriptions) throws IOException
undeployDescriptions
- the descriptions for undeploying the contentIOException
- if a failure occurs communicating with the serverSet<DeploymentDescription> getDeployments() throws IOException
IOException
- if a failure occurs communicating with the serverSet<DeploymentDescription> getDeployments(String serverGroup) throws IOException
serverGroup
- the server group to get the deployments forIOException
- if a failure occurs communicating with the serverIllegalStateException
- if the running server is not a managed domainSet<String> getDeploymentNames() throws IOException
IOException
- if a failure occurs communicating with the serverboolean hasDeployment(String name) throws IOException
name
- the name of the deploymenttrue
if the deployment content exists otherwise false
IOException
- if a failure occurs communicating with the serverboolean hasDeployment(String name, String serverGroup) throws IOException
name
- the name of the deploymentserverGroup
- the server group to check for the deployment ontrue
if the deployment content exists otherwise false
IOException
boolean isEnabled(String name) throws IOException
If a deployment is enabled it has been deployed to the runtime. Otherwise the deployment has not been deployed to the runtime.
name
- the name of the deploymenttrue
if the deployment content exists and is enabled otherwise false
IOException
- if a failure occurs communicating with the serverfor managed domain deployments
boolean isEnabled(String name, String serverGroup) throws IOException
If a deployment is enabled it has been deployed to the runtime. Otherwise the deployment has not been deployed to the runtime.
name
- the name of the deploymentserverGroup
- the server group to check for the deployment ontrue
if the deployment content exists and is enabled otherwise false
IOException
for standalone deployments
Copyright © 2016 JBoss by Red Hat. All rights reserved.