Class AbstractGlassFishInstalledLocalDeployer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployer.AbstractDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
-
- org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalDeployer
-
- Direct Known Subclasses:
GlassFish2xInstalledLocalDeployer,GlassFish3xInstalledLocalDeployer
public abstract class AbstractGlassFishInstalledLocalDeployer extends AbstractLocalDeployer
GlassFish installed local deployer, which uses the GlassFish asadmin to deploy and undeploy applications.
-
-
Constructor Summary
Constructors Constructor Description AbstractGlassFishInstalledLocalDeployer(InstalledLocalContainer localContainer)Calls parent constructor, which saves the container.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidactivateDefaultPrincipalToRoleMapping()Activates the default principal to role mapping.protected voidaddConnectOptions(List<String> args)Adds connection options.protected voidaddDeploymentArguments(List<String> args)Adds deployment arguments defined byGlassFishPropertySet.DEPLOY_ARG_PREFIX.protected voidaddUndeploymentArguments(List<String> args)Adds undeployment arguments defined byGlassFishPropertySet.UNDEPLOY_ARG_PREFIX.abstract voidcreateFileUser(User user)Callscreate-file-uservia asadmin to register a user.voiddeploy(Deployable deployable)Deploy aDeployableto the running container and make it available for requests.abstract voiddeployDatasource(DataSource dataSource)Deploy a datasource.abstract voiddeployResource(Resource resource)Deploy a resource.protected abstract voiddoDeploy(Deployable deployable, boolean overwrite)Does the actual deployment.protected StringgetDeployableName(Deployable deployable)Get deployable name.protected AbstractGlassFishInstalledLocalContainergetLocalContainer()Casts the container and returns.DeployerTypegetType()voidredeploy(Deployable deployable)Redeploy aDeployablealready deployed to the running container.voidredeploy(Deployable deployable, DeployableMonitor monitor)Redeploy aDeployablealready deployed to the running container.voidstart(Deployable deployable)Starts aDeployablethat is already deployed in the running container but that is not servicing requests.voidstop(Deployable deployable)Stop aDeployablethat is already deployed in the running container in order to prevent it from servicing requests.abstract voidundeployDatasource(String poolName, String jdbcName)Undeploy a datasource.-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
getContainer, getFileHandler
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer
deploy, deploy, redeploy, start, stop, undeploy, undeploy
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
AbstractGlassFishInstalledLocalDeployer
public AbstractGlassFishInstalledLocalDeployer(InstalledLocalContainer localContainer)
Calls parent constructor, which saves the container.- Parameters:
localContainer- Container.
-
-
Method Detail
-
getLocalContainer
protected AbstractGlassFishInstalledLocalContainer getLocalContainer()
Casts the container and returns.- Returns:
- Cast container.
-
getType
public DeployerType getType()
- Returns:
- the deployer's type (local, remote, etc)
-
deploy
public void deploy(Deployable deployable)
Deploy aDeployableto the running container and make it available for requests.- Specified by:
deployin interfaceDeployer- Overrides:
deployin classAbstractDeployer- Parameters:
deployable- theDeployableto deploy
-
redeploy
public void redeploy(Deployable deployable)
Redeploy a
Deployablealready deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployers based on theAbstractCopyingInstalledLocalDeployer.- Specified by:
redeployin interfaceDeployer- Overrides:
redeployin classAbstractDeployer- Parameters:
deployable- theDeployableto redeploy- See Also:
Deployer.deploy(Deployable),Deployer.undeploy(Deployable)
-
redeploy
public void redeploy(Deployable deployable, DeployableMonitor monitor)
Redeploy a
Deployablealready deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployers based on theAbstractCopyingInstalledLocalDeployer.- Specified by:
redeployin interfaceDeployer- Overrides:
redeployin classAbstractDeployer- Parameters:
deployable- theDeployableto redeploymonitor- the monitor that checks for deployment status- See Also:
Deployer.deploy(Deployable),Deployer.undeploy(Deployable)
-
doDeploy
protected abstract void doDeploy(Deployable deployable, boolean overwrite)
Does the actual deployment.- Parameters:
deployable- Deployable to deploy.overwrite- Whether to overwrite.
-
deployDatasource
public abstract void deployDatasource(DataSource dataSource)
Deploy a datasource.- Parameters:
dataSource- Datasource to deploy.
-
undeployDatasource
public abstract void undeployDatasource(String poolName, String jdbcName)
Undeploy a datasource.- Parameters:
poolName- Pool name of datasource to undeploy.jdbcName- JNDI name of datasource to undeploy.
-
deployResource
public abstract void deployResource(Resource resource)
Deploy a resource. There is no undeployResource inverse function.- Parameters:
resource- resource to deploy.
-
start
public void start(Deployable deployable)
Starts aDeployablethat is already deployed in the running container but that is not servicing requests.- Specified by:
startin interfaceDeployer- Overrides:
startin classAbstractDeployer- Parameters:
deployable- theDeployableto start
-
stop
public void stop(Deployable deployable)
Stop aDeployablethat is already deployed in the running container in order to prevent it from servicing requests.- Specified by:
stopin interfaceDeployer- Overrides:
stopin classAbstractDeployer- Parameters:
deployable- theDeployableto stop
-
addConnectOptions
protected void addConnectOptions(List<String> args)
Adds connection options.- Parameters:
args- List to add to.
-
addDeploymentArguments
protected void addDeploymentArguments(List<String> args)
Adds deployment arguments defined byGlassFishPropertySet.DEPLOY_ARG_PREFIX.- Parameters:
args- args to populate
-
addUndeploymentArguments
protected void addUndeploymentArguments(List<String> args)
Adds undeployment arguments defined byGlassFishPropertySet.UNDEPLOY_ARG_PREFIX.- Parameters:
args- args to populate
-
getDeployableName
protected String getDeployableName(Deployable deployable)
Get deployable name.- Parameters:
deployable- Deployable to get the name of.- Returns:
- Deployable name, either based on file name or deployable name.
-
createFileUser
public abstract void createFileUser(User user)
Callscreate-file-uservia asadmin to register a user.- Parameters:
user- user to register
-
activateDefaultPrincipalToRoleMapping
public abstract void activateDefaultPrincipalToRoleMapping()
Activates the default principal to role mapping. This allows groups defined incargo.servlet.usersto be used as the roles for the application.
-
-