org.glassfish.deployment.common
Class SimpleDeployer<T extends Container,U extends ApplicationContainer>

java.lang.Object
  extended by org.glassfish.deployment.common.SimpleDeployer<T,U>
All Implemented Interfaces:
Deployer<T,U>

public abstract class SimpleDeployer<T extends Container,U extends ApplicationContainer>
extends Object
implements Deployer<T,U>

Convenient superclass for Deployers which only do prepare and clean up and do not actually load/unload application


Constructor Summary
SimpleDeployer()
           
 
Method Summary
 void clean(DeploymentContext context)
          Clean any files and artifacts that were created during the execution of the prepare method.
protected abstract  void cleanArtifacts(DeploymentContext dc)
           
protected abstract  void generateArtifacts(DeploymentContext dc)
           
 MetaData getMetaData()
          Returns the meta data assocated with this Deployer
 U load(T container, DeploymentContext context)
          No-op
<V> V
loadMetaData(Class<V> type, DeploymentContext context)
          Loads the meta date associated with the application.
 boolean prepare(DeploymentContext dc)
          Prepares the application bits for running in the application server.
 void unload(U appContainer, DeploymentContext context)
          No-op
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDeployer

public SimpleDeployer()
Method Detail

loadMetaData

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

Specified by:
loadMetaData in interface Deployer<T extends Container,U extends ApplicationContainer>

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)
No-op

Specified by:
load in interface Deployer<T extends Container,U extends ApplicationContainer>

unload

public void unload(U appContainer,
                   DeploymentContext context)
No-op

Specified by:
unload in interface Deployer<T extends Container,U extends ApplicationContainer>

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

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

generateArtifacts

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

cleanArtifacts

protected abstract void cleanArtifacts(DeploymentContext dc)
                                throws DeploymentException
Throws:
DeploymentException


Copyright © 2012 GlassFish Community. All Rights Reserved.