|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.deployment.autodeploy.AutoDeployer
public class AutoDeployer
Handles the logic of deploying the module/app to the required destination. The destination is specified on the constructor and can be modified by calling setTarget(). The specific directory scanner can be set using setDirectoryScanner, default is AutoDeployDirectoryScanner
| Nested Class Summary | |
|---|---|
static class |
AutoDeployer.AutodeploymentStatus
|
| Field Summary | |
|---|---|
protected static int |
DEPLOY_FAILURE
|
protected static int |
DEPLOY_PENDING
|
protected static int |
DEPLOY_SUCCESS
|
| Constructor Summary | |
|---|---|
AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
boolean jspPrecompilationEnabled,
boolean verifierEnabled,
boolean renameOnSuccess,
boolean forceDeploy,
boolean enabled,
org.jvnet.hk2.component.Habitat habitat)
Creates a new instance of AutoDeployer |
|
AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
boolean jspPrecompilationEnabled,
boolean verifierEnabled,
org.jvnet.hk2.component.Habitat habitat)
|
|
AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
org.jvnet.hk2.component.Habitat habitat)
Creates a new autodeployer. |
|
| Method Summary | |
|---|---|
void |
cancel(boolean value)
set cancel flag, which will ensure that only if there is any current deployment is in process, it will be completed but the deployer will not do any more deployment. |
protected AutoDeployer.AutodeploymentStatus |
deploy(java.io.File deployablefile,
java.io.File autodeployDir)
Deploy any type of module. |
void |
disableRenameOnSuccess()
If an archive is successfully autodeployed, file will not be renamed to archive_deployed |
void |
enableRenameOnSuccess()
If an archive is successfully autodeployed will be renamed to archive_deployed |
boolean |
isCancelled()
get cancel flag value |
void |
run()
Run through the auto-deployment procedure. |
void |
run(boolean includeSubdir)
|
void |
setDirectory(java.lang.String directoryPath)
Sets the directory to be scanned by the autodeployer. |
void |
setDirectoryScanner(DirectoryScanner ds)
set DirectoryScanner which will be used for filtering out deployeble component |
void |
setHabitat(org.jvnet.hk2.component.Habitat habitat)
Sets the habitat for use in creating DeployCommand and UndeployCommand instances. |
void |
setJspPreCompilation(boolean jspPreCompilation)
Set whether this AutoDeployer should precompile JSPs or not. |
void |
setJspPrecompilationEnabled(boolean setting)
Sets whether or not the precompileJSP option should be requested during autodeployments. |
void |
setTarget(java.lang.String target)
set target server where the autual deployment will be done |
void |
setVerifierEnabled(boolean verify)
Sets whether descriptor verification should be requested during autodeployments. |
void |
setVerify(boolean verify)
Set whether this AutoDeployer should verify or not. |
void |
undeployAll(java.io.File autoDeployDir,
boolean includeSubdir)
do undeployment for all deleted applications in autoDeployDir dir. |
void |
waitUntilIdle()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEPLOY_SUCCESS
protected static final int DEPLOY_FAILURE
protected static final int DEPLOY_PENDING
| Constructor Detail |
|---|
public AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
org.jvnet.hk2.component.Habitat habitat)
throws AutoDeploymentException
target - deployment target for autodeployed applicationsdirectoryPath - directory to be scanned for changesvirtualServer - the virtual server to which to deploy apps tohabitat - hk2 habitat for injection support
AutoDeploymentException
public AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
boolean jspPrecompilationEnabled,
boolean verifierEnabled,
boolean renameOnSuccess,
boolean forceDeploy,
boolean enabled,
org.jvnet.hk2.component.Habitat habitat)
throws AutoDeploymentException
target - the deployment target for autodeployed applicationsdirectoryPath - the directory to scanvirtualServer - the virtual server to deploy tojspPrecompilationEnabled - whether to precompile JSPsverifierEnabled - whether to verify applications during deploymentrenameOnSuccess - rename the file if deployment is successfulforceDeploy - request that forced deployment occur if the app is already deployedenabled - whether apps should be enabled upon auto-deploymenthabitat - HK2 habitat for use in instantiating properly-init'd DeployCommand and UndeployCommand
AutoDeploymentException
public AutoDeployer(java.lang.String target,
java.lang.String directoryPath,
java.lang.String virtualServer,
boolean jspPrecompilationEnabled,
boolean verifierEnabled,
org.jvnet.hk2.component.Habitat habitat)
throws AutoDeploymentException
AutoDeploymentException| Method Detail |
|---|
public void setHabitat(org.jvnet.hk2.component.Habitat habitat)
habitat - public void setJspPrecompilationEnabled(boolean setting)
setting - true if JSPs should be precompiled during autodeployments
public void setDirectory(java.lang.String directoryPath)
throws AutoDeploymentException
directoryPath - the directory path to scan
AutoDeploymentExceptionpublic void setVerifierEnabled(boolean verify)
verify - true if verification should occur during autodeploymentspublic void setDirectoryScanner(DirectoryScanner ds)
ds - the new directory scanner to usepublic void setTarget(java.lang.String target)
target - public void disableRenameOnSuccess()
public void enableRenameOnSuccess()
public void setVerify(boolean verify)
verify - whether to verify the app during deploymentpublic void setJspPreCompilation(boolean jspPreCompilation)
jspPreCompilation - precompilation settingpublic void run()
Clients should invoke this method to execute the auto-deployer once with the current configurable settings.
public void run(boolean includeSubdir)
public void waitUntilIdle()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void undeployAll(java.io.File autoDeployDir,
boolean includeSubdir)
throws AutoDeploymentException
autoDeployDir - the directory to scan for deleted files
AutoDeploymentExceptionpublic void cancel(boolean value)
value - the cancel settingpublic boolean isCancelled()
protected AutoDeployer.AutodeploymentStatus deploy(java.io.File deployablefile,
java.io.File autodeployDir)
throws AutoDeploymentException
deployablefile - the file to be deployedautodeployDir - the directory where the file resides (holdover from earlier impl)
AutoDeploymentException - if any invoked method throws an exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||