org.glassfish.javaee.core.deployment
Class JavaEEDeployer<T extends Container,U extends ApplicationContainer>

java.lang.Object
  extended by org.glassfish.javaee.core.deployment.JavaEEDeployer<T,U>
All Implemented Interfaces:
Deployer<T,U>

public abstract class JavaEEDeployer<T extends Container,U extends ApplicationContainer>
extends java.lang.Object
implements Deployer<T,U>

Convenient superclass for JavaEE Deployer implementations.


Field Summary
protected  ApplicationRegistry appRegistry
           
protected  ServerEnvironment env
           
protected  org.jvnet.hk2.component.Habitat habitat
           
protected  ApplicationVisitor undeploymentVisitor
           
 
Constructor Summary
JavaEEDeployer()
           
 
Method Summary
 void clean(DeploymentContext context)
          Clean any files and artifacts that were created during the execution of the prepare method.
protected  void generateArtifacts(DeploymentContext dc)
           
protected  Application getApplicationFromApplicationInfo(java.lang.String appName)
           
protected  java.lang.String getCommonClassPath()
           
 MetaData getMetaData()
          Returns the meta data assocated with this Deployer
protected  java.lang.String getModuleClassPath(DeploymentContext ctx)
          Returns the classpath associated with this module Can be used to compile generated cmp classes, rmi stubs etc.
protected abstract  java.lang.String getModuleType()
           
protected  java.lang.String getObjectType(DeploymentContext context)
           
 U 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(java.lang.Class<V> type, DeploymentContext dc)
          Loads the meta date associated with the application.
 boolean prepare(DeploymentContext dc)
          Prepares the application bits for running in the application server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.api.deployment.Deployer
unload
 

Field Detail

env

protected ServerEnvironment env

appRegistry

protected ApplicationRegistry appRegistry

habitat

protected org.jvnet.hk2.component.Habitat habitat

undeploymentVisitor

protected ApplicationVisitor undeploymentVisitor
Constructor Detail

JavaEEDeployer

public JavaEEDeployer()
Method Detail

getMetaData

public MetaData getMetaData()
Returns the meta data assocated with this Deployer

Specified by:
getMetaData in interface Deployer<T extends Container,U extends ApplicationContainer>
Returns:
the meta data for this Deployer

getModuleClassPath

protected java.lang.String getModuleClassPath(DeploymentContext ctx)
Returns the classpath associated with this module Can be used to compile generated cmp classes, rmi stubs etc.

Returns:
the classpath for this module

getCommonClassPath

protected java.lang.String getCommonClassPath()

loadMetaData

public <V> V loadMetaData(java.lang.Class<V> type,
                          DeploymentContext dc)
Loads the meta date associated with the application.

Specified by:
loadMetaData in interface Deployer<T extends Container,U extends ApplicationContainer>
Parameters:
type - type of metadata that this deployer has declared providing.
dc - deployment context

prepare

public boolean prepare(DeploymentContext dc)
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 interface Deployer<T extends Container,U extends ApplicationContainer>
Parameters:
dc - deployment context
Returns:
true if the prepare phase was successful

load

public U 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.

Specified by:
load in interface Deployer<T extends Container,U extends ApplicationContainer>
Parameters:
container - in which the application will reside
context - of the deployment
Returns:
an ApplicationContainer instance identifying the running application

generateArtifacts

protected void generateArtifacts(DeploymentContext dc)
                          throws DeploymentException
Throws:
DeploymentException

clean

public void clean(DeploymentContext context)
Clean any files and artifacts that were created during the execution of the prepare method.

Specified by:
clean in interface Deployer<T extends Container,U extends ApplicationContainer>
Parameters:
context - deployment context

getObjectType

protected java.lang.String getObjectType(DeploymentContext context)

getApplicationFromApplicationInfo

protected Application getApplicationFromApplicationInfo(java.lang.String appName)

getModuleType

protected abstract java.lang.String getModuleType()


Copyright © 2012 GlassFish Community. All Rights Reserved.