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 void
activateDefaultPrincipalToRoleMapping()
Activates the default principal to role mapping.protected void
addConnectOptions(List<String> args)
Adds connection options.protected void
addDeploymentArguments(List<String> args)
Adds deployment arguments defined byGlassFishPropertySet.DEPLOY_ARG_PREFIX
.protected void
addUndeploymentArguments(List<String> args)
Adds undeployment arguments defined byGlassFishPropertySet.UNDEPLOY_ARG_PREFIX
.abstract void
createFileUser(User user)
Callscreate-file-user
via asadmin to register a user.protected String
cutExtension(String name)
Returns a filename without its extension.void
deploy(Deployable deployable)
Deploy aDeployable
to the running container and make it available for requests.abstract void
deployDatasource(DataSource dataSource)
Deploy a datasource.abstract void
deployResource(Resource resource)
Deploy a resource.protected abstract void
doDeploy(Deployable deployable, boolean overwrite)
Does the actual deployment.protected AbstractGlassFishInstalledLocalContainer
getLocalContainer()
Casts the container and returns.DeployerType
getType()
void
redeploy(Deployable deployable)
Redeploy aDeployable
already deployed to the running container.void
redeploy(Deployable deployable, DeployableMonitor monitor)
Redeploy aDeployable
already deployed to the running container.void
start(Deployable deployable)
Starts aDeployable
that is already deployed in the running container but that is not servicing requests.void
stop(Deployable deployable)
Stop aDeployable
that is already deployed in the running container in order to prevent it from servicing requests.abstract void
undeployDatasource(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 aDeployable
to the running container and make it available for requests.- Specified by:
deploy
in interfaceDeployer
- Overrides:
deploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to deploy
-
redeploy
public void redeploy(Deployable deployable)
Redeploy a
Deployable
already deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployer
s based on theAbstractCopyingInstalledLocalDeployer
.- Specified by:
redeploy
in interfaceDeployer
- Overrides:
redeploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to redeploy- See Also:
Deployer.deploy(Deployable)
,Deployer.undeploy(Deployable)
-
redeploy
public void redeploy(Deployable deployable, DeployableMonitor monitor)
Redeploy a
Deployable
already deployed to the running container. The service becomes available for requests.Note that this method will be unsupported by the
Deployer
s based on theAbstractCopyingInstalledLocalDeployer
.- Specified by:
redeploy
in interfaceDeployer
- Overrides:
redeploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to 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 aDeployable
that is already deployed in the running container but that is not servicing requests.- Specified by:
start
in interfaceDeployer
- Overrides:
start
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to start
-
stop
public void stop(Deployable deployable)
Stop aDeployable
that is already deployed in the running container in order to prevent it from servicing requests.- Specified by:
stop
in interfaceDeployer
- Overrides:
stop
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to stop
-
cutExtension
protected String cutExtension(String name)
Returns a filename without its extension.- Parameters:
name
- Filename.- Returns:
- Filename without its extension.
-
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
-
createFileUser
public abstract void createFileUser(User user)
Callscreate-file-user
via 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.users
to be used as the roles for the application.
-
-