Class GenericDeployer<T extends Container>
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericDeployer<T>
-
- All Implemented Interfaces:
Deployer<T,GenericApplicationContainer>
@Service public class GenericDeployer<T extends Container> extends Object implements Deployer<T,GenericApplicationContainer>
Generic implementation of the deployer contract, enough to get started with adding a container to GlassFish.- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description GenericDeployer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean(DeploymentContext context)
Clean any files and artifacts that were created during the execution of the prepare method.MetaData
getMetaData()
Returns the meta data associated with this DeployerGenericApplicationContainer
load(T container, DeploymentContext context)
Loads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.<V> V
loadMetaData(Class<V> type, DeploymentContext context)
Loads the meta date associated with the application.boolean
prepare(DeploymentContext context)
Prepares the application bits for running in the application server.void
unload(GenericApplicationContainer appContainer, DeploymentContext context)
Unload or stop a previously running application identified with the ContractProvider instance.
-
-
-
Method Detail
-
getMetaData
public MetaData getMetaData()
Description copied from interface:Deployer
Returns the meta data associated with this Deployer- Specified by:
getMetaData
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Returns:
- the meta data for this Deployer
-
loadMetaData
public <V> V loadMetaData(Class<V> type, DeploymentContext context)
Description copied from interface:Deployer
Loads the meta date associated with the application.- Specified by:
loadMetaData
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Parameters:
type
- type of meta-data that this deployer has declared providing.- Returns:
- the meta-data of type V
-
prepare
public boolean prepare(DeploymentContext context)
Description copied from interface:Deployer
Prepares the application bits for running in the application server. For certain cases, this is generating non portable artifacts and other application specific tasks. Failure to prepare should throw an exception which will cause the overall deployment to fail.- Specified by:
prepare
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Parameters:
context
- of the deployment- Returns:
- true if the prepare phase executed successfully
-
load
public GenericApplicationContainer load(T container, DeploymentContext context)
Description copied from interface:Deployer
Loads a previously prepared application in its execution environment and return a ContractProvider instance that will identify this environment in future communications with the application's container runtime.- Specified by:
load
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Parameters:
container
- in which the application will residecontext
- of the deployment- Returns:
- an ApplicationContainer instance identifying the running application
-
unload
public void unload(GenericApplicationContainer appContainer, DeploymentContext context)
Description copied from interface:Deployer
Unload or stop a previously running application identified with the ContractProvider instance. The container will be stop upon return from this method.- Specified by:
unload
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Parameters:
appContainer
- instance to be stoppedcontext
- of the undeployment
-
clean
public void clean(DeploymentContext context)
Description copied from interface:Deployer
Clean any files and artifacts that were created during the execution of the prepare method.- Specified by:
clean
in interfaceDeployer<T extends Container,GenericApplicationContainer>
- Parameters:
context
- deployment context
-
-