Package org.glassfish.kernel.embedded
Class EmbeddedDeployerImpl
- java.lang.Object
-
- org.glassfish.kernel.embedded.EmbeddedDeployerImpl
-
- All Implemented Interfaces:
EmbeddedDeployer
@Service public class EmbeddedDeployerImpl extends Object implements EmbeddedDeployer
- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description EmbeddedDeployerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
deploy(File archive, DeployCommandParameters params)
Deploys a file or directory to the servers passing the deployment command parameters Starts the server if it is not started yet.String
deploy(ReadableArchive archive, DeployCommandParameters params)
Deploys an archive abstraction to the servers passing the deployment command parametersFile
getApplicationsDir()
Returns the location of the applications directory, where deployed applications are saved.File
getAutoDeployDir()
Returns the location of the auto-deploy directory.void
setAutoDeploy(boolean flag)
Enables or disables the auto-deployment featurevoid
undeploy(String name, UndeployCommandParameters params)
Undeploys a previously deployed applicationvoid
undeployAll()
Undeploys all deployed applications.
-
-
-
Method Detail
-
getApplicationsDir
public File getApplicationsDir()
Description copied from interface:EmbeddedDeployer
Returns the location of the applications directory, where deployed applications are saved.- Specified by:
getApplicationsDir
in interfaceEmbeddedDeployer
- Returns:
- the deployed application directory.
-
getAutoDeployDir
public File getAutoDeployDir()
Description copied from interface:EmbeddedDeployer
Returns the location of the auto-deploy directory.- Specified by:
getAutoDeployDir
in interfaceEmbeddedDeployer
- Returns:
- the auto-deploy directory
-
setAutoDeploy
public void setAutoDeploy(boolean flag)
Description copied from interface:EmbeddedDeployer
Enables or disables the auto-deployment feature- Specified by:
setAutoDeploy
in interfaceEmbeddedDeployer
- Parameters:
flag
- set to true to enable, false to disable
-
deploy
public String deploy(File archive, DeployCommandParameters params)
Description copied from interface:EmbeddedDeployer
Deploys a file or directory to the servers passing the deployment command parameters Starts the server if it is not started yet.- Specified by:
deploy
in interfaceEmbeddedDeployer
- Parameters:
archive
- archive or directory of the applicationparams
- deployment command parameters- Returns:
- the deployed application name
-
deploy
public String deploy(ReadableArchive archive, DeployCommandParameters params)
Description copied from interface:EmbeddedDeployer
Deploys an archive abstraction to the servers passing the deployment command parameters- Specified by:
deploy
in interfaceEmbeddedDeployer
- Parameters:
archive
- archive or directory of the applicationparams
- deployment command parameters- Returns:
- the deployed application name
-
undeploy
public void undeploy(String name, UndeployCommandParameters params)
Description copied from interface:EmbeddedDeployer
Undeploys a previously deployed application- Specified by:
undeploy
in interfaceEmbeddedDeployer
- Parameters:
name
- name returned by {@link EmbeddedDeployer#deploy(File, org.glassfish.api.deployment.DeployCommandParameters}params
- the undeployment parameters, can be null for default values
-
undeployAll
public void undeployAll()
Description copied from interface:EmbeddedDeployer
Undeploys all deployed applications.- Specified by:
undeployAll
in interfaceEmbeddedDeployer
-
-