public interface DeploymentPlanBuilder
DeploymentPlan
. This interface
defines the core set of builder operations; various subinterfaces define
additional operations that become available as a result of executing the
methods in this interface.aModifier and Type | Method and Description |
---|---|
AddDeploymentPlanBuilder |
add(File file)
Indicates the content of the specified file should be added to the content
repository.
|
AddDeploymentPlanBuilder |
add(String name,
File file)
Indicates the content of the specified fileL should be added to the content
repository.
|
AddDeploymentPlanBuilder |
add(String name,
InputStream stream)
Indicates the content readable from the specified
InputStream
should be added to the content repository. |
AddDeploymentPlanBuilder |
add(String name,
String commonName,
InputStream stream)
Indicates the content readable from the specified
InputStream
should be added to the content repository. |
AddDeploymentPlanBuilder |
add(String name,
URL url)
Indicates the content at the specified URL should be added to the content
repository.
|
AddDeploymentPlanBuilder |
add(URL url)
Indicates the content at the specified URL should be added to the content
repository.
|
DeploymentPlan |
build()
Creates the deployment plan.
|
DeploymentPlanBuilder |
deploy(String deploymentName)
Indicates the specified deployment content should be deployed.
|
List<DeploymentAction> |
getDeploymentActions()
Gets the list of
DeploymentAction s created as a recent of
builder operations, in order of when they were created. |
long |
getGracefulShutdownTimeout()
Gets the maximum period, in ms, the builder will configure the deployment plan to
wait for potentially long-running in-process work ito complete before
shutdown proceeds.
|
DeploymentAction |
getLastAction()
Gets the
DeploymentAction most recently created as a result of
builder operations. |
boolean |
isGlobalRollback()
Gets whether all
deploy , undeploy , replace
or remove operations associated with the deployment plan
should be rolled back in case of a failure in any of them. |
boolean |
isGracefulShutdown()
Gets whether the builder will create a deployment plan organized around
a graceful shutdown of the server, where potentially long-running in-process
work is given time to complete before shutdown proceeds.
|
boolean |
isShutdown()
Gets whether the builder will create a deployment plan organized around
a shutdown of the server.
|
DeploymentPlanBuilder |
redeploy(String deploymentName)
Indicates the specified deployment content should be redeployed (i.e.
|
DeploymentPlanBuilder |
remove(String deploymentName)
Indicates the specified deployment content should be removed from the
content repository.
|
DeploymentPlanBuilder |
replace(File file)
Indicates the content of the specified file should be added to the content
repository and replace existing content of the same name.
|
DeploymentPlanBuilder |
replace(String name,
File file)
Indicates the content of the specified file should be added to the content
repository and replace existing content of the same name.
|
DeploymentPlanBuilder |
replace(String name,
InputStream stream)
Indicates the content readable from the specified
InputStream
should be added to the content repository and replace existing
content of the same name. |
ReplaceDeploymentPlanBuilder |
replace(String replacementDeploymentName,
String toReplaceDeploymentName)
Indicates the specified deployment content should be deployed, replacing
the specified existing deployment.
|
DeploymentPlanBuilder |
replace(String name,
String commonName,
InputStream stream)
Indicates the content readable from the specified
InputStream
should be added to the content repository and replace existing
content of the same name. |
DeploymentPlanBuilder |
replace(String name,
URL url)
Indicates the content at the specified URL should be added to the content
repository and replace existing content of the same name.
|
DeploymentPlanBuilder |
replace(URL url)
Indicates the content at the specified URL should be added to the content
repository and replace existing content of the same name.
|
UndeployDeploymentPlanBuilder |
undeploy(String deploymentName)
Indicates the specified deployment content should be undeployed.
|
DeploymentAction getLastAction()
DeploymentAction
most recently created as a result of
builder operations.null
if there have been no actions.List<DeploymentAction> getDeploymentActions()
DeploymentAction
s created as a recent of
builder operations, in order of when they were created.null
boolean isGlobalRollback()
deploy
, undeploy
, replace
or remove
operations associated with the deployment plan
should be rolled back in case of a failure in any of them.true
if all operations should be rolled back if
any of them failboolean isShutdown()
true
if the plan will be organized around a shutdown,
false
otherwiseboolean isGracefulShutdown()
true
if the plan will be organized around a graceful shutdown,
false
otherwiselong getGracefulShutdownTimeout()
-1
if isGracefulShutdown()
would return true
AddDeploymentPlanBuilder add(File file) throws IOException
file.getName()
.
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
file
- file containing the new contentIOException
AddDeploymentPlanBuilder add(URL url) throws IOException
url.getPath()
.
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
url
- URL pointing to the new contentIOException
AddDeploymentPlanBuilder add(String name, File file) throws IOException
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
name
- name that should be given to the new content to uniquely
identify it within the server's management system. Must be different from the
name given to an other deployment content presently available
on the serverfile
- file containing the new contentIOException
AddDeploymentPlanBuilder add(String name, URL url) throws IOException
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
name
- name that should be given to the new content to uniquely
identify it within the server. Must be different from the
name given to an other deployment content presently available
on the serverurl
- URL pointing to the new contentIOException
AddDeploymentPlanBuilder add(String name, InputStream stream)
InputStream
should be added to the content repository.
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
name
- name that should be given to the new content to uniquely
identify it within the server's management system. Must be different from the
name given to an other deployment content presently available
on the serverstream
- InputStream
from which the new content should be read
This stream has to be closed by the caller.AddDeploymentPlanBuilder add(String name, String commonName, InputStream stream) throws IOException
InputStream
should be added to the content repository.
Note that this operation does not indicate the content should
be deployed into the runtime. See AddDeploymentPlanBuilder.andDeploy()
.
name
- name that should be given to the new content to uniquely
identify it within the server's management system. Must be different from the
name given to an other deployment content presently available
on the servercommonName
- name by which the deployment should be known within
the runtime. This would be equivalent to the file name
of a deployment file, and would form the basis for such
things as default Java Enterprise Edition application and
module names. This would typically be the same
as name
(in which case add(String, InputStream)
would normally be used, but in some cases users may wish
to have two deployments with the same common name may (e.g.
two versions of "foo.war" both available in the deployment
content repository), in which case the deployments
would need to have distinct name
values but
would have the same commonName
stream
- InputStream
from which the new content should be read
This stream has to be closed by the caller.IOException
DeploymentPlanBuilder deploy(String deploymentName)
deploymentName
- unique identifier of the deployment contentUndeployDeploymentPlanBuilder undeploy(String deploymentName)
deploymentName
- unique identifier of the deployment contentDeploymentPlanBuilder redeploy(String deploymentName)
deploymentName
- unique identifier of the deployment contentReplaceDeploymentPlanBuilder replace(String replacementDeploymentName, String toReplaceDeploymentName)
replacementDeploymentName
- unique identifier of the content to deploytoReplaceDeploymentName
- unique identifier of the currently deployed content to replaceDeploymentPlanBuilder replace(File file) throws IOException
file.getName()
.
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
file
- file containing the new contentIOException
DeploymentPlanBuilder replace(URL url) throws IOException
url.getPath()
.
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
url
- URL pointing to the new contentIOException
DeploymentPlanBuilder replace(String name, File file) throws IOException
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
name
- name that should be given to the new contentfile
- file containing the new contentIOException
DeploymentPlanBuilder replace(String name, URL url) throws IOException
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
name
- name that should be given to the new contenturl
- URL pointing to the new contentIOException
DeploymentPlanBuilder replace(String name, InputStream stream)
InputStream
should be added to the content repository and replace existing
content of the same name.
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
name
- name that should be given to the new contentstream
- InputStream
from which the new content should be read
This stream has to be closed by the caller.DeploymentPlanBuilder replace(String name, String commonName, InputStream stream)
InputStream
should be added to the content repository and replace existing
content of the same name.
Whether this operation will result in the new content being deployed into the runtime depends on whether the existing content being replaced is deployed. If the content being replaced is deployed the old content will be undeployed and the new content will be deployed.
name
- name that should be given to the new contentcommonName
- name by which the deployment should be known within
the runtime. This would be equivalent to the file name
of a deployment file, and would form the basis for such
things as default Java Enterprise Edition application and
module names. This would typically be the same
as name
(in which case add(String, InputStream)
would normally be used, but in some cases users may wish
to have two deployments with the same common name may (e.g.
two versions of "foo.war" both available in the deployment
content repository), in which case the deployments
would need to have distinct name
values but
would have the same commonName
stream
- InputStream
from which the new content should be read.
This stream has to be closed by the caller.DeploymentPlanBuilder remove(String deploymentName)
deploymentName
- unique identifier of the deployment contentDeploymentPlan build()
Copyright © 2018 JBoss by Red Hat. All rights reserved.