com.caucho.env.deploy
Class DeployGenerator<E extends DeployControllerApi<?>>

java.lang.Object
  extended by com.caucho.env.deploy.DeployGenerator<E>
All Implemented Interfaces:
EnvironmentListener, Dependency
Direct Known Subclasses:
DeployListGenerator, EarSingleDeployGenerator, ExpandDeployGenerator, HostRegexpDeployGenerator, HostSingleDeployGenerator, WebAppEarDeployGenerator, WebAppRegexpDeployGenerator, WebAppSingleDeployGenerator

public abstract class DeployGenerator<E extends DeployControllerApi<?>>
extends java.lang.Object
implements Dependency, EnvironmentListener

The generator for the deploy


Constructor Summary
DeployGenerator(DeployContainer<E> container)
          Creates the deploy.
 
Method Summary
 void destroy()
          Closes the deploy
protected  void destroyImpl()
          Derived class implentation of destroy.
 void environmentBind(EnvironmentClassLoader loader)
          Handles the case where the environment is starting (after init).
 void environmentConfigure(EnvironmentClassLoader loader)
          Handles the case where the environment is configuring (after init).
 void environmentStart(EnvironmentClassLoader loader)
          Handles the case where the environment is starting (after init).
 void environmentStop(EnvironmentClassLoader loader)
          Handles the case where the environment is stopping
protected  void fillDeployedNames(java.util.Set<java.lang.String> names)
          Returns the deployed names.
protected  void generateController(java.lang.String name, java.util.ArrayList<E> controllers)
          Generates the controller.
 java.lang.Throwable getConfigException()
           
 DeployContainer<E> getDeployContainer()
          Returns the deploy container.
protected  java.util.logging.Logger getLog()
          Returns the log.
 java.lang.ClassLoader getParentClassLoader()
          Returns the parent class loader.
 DeployMode getRedeployMode()
          Gets the redeploy mode.
 DeployMode getStartupMode()
          Gets the startup mode.
 java.lang.String getState()
           
 void init()
           
protected  void initImpl()
          Derived class implementation of init
 boolean isActive()
           
 boolean isDestroyed()
           
 boolean isModified()
          Returns true if the deployment has modified.
 boolean logModified(java.util.logging.Logger log)
          Returns true if the deployment has modified.
protected  void mergeController(E controller, java.lang.String name)
          Merges the entry with other matching entries, returning the new entry.
 void setRedeployMode(DeployMode mode)
          Sets the redeploy mode.
 void setStartupMode(DeployMode mode)
          Sets the startup mode.
 void start()
          Starts the deployment.
protected  void startImpl()
          Derived class implentation of start.
 void stop()
          Stops the deploy
protected  void stopImpl()
          Derived class implentation of stop.
 java.lang.String toString()
           
 void update()
          Forces an update.
 void updateIfModified()
          lazy-start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeployGenerator

public DeployGenerator(DeployContainer<E> container)
Creates the deploy.

Method Detail

getDeployContainer

public DeployContainer<E> getDeployContainer()
Returns the deploy container.


getParentClassLoader

public java.lang.ClassLoader getParentClassLoader()
Returns the parent class loader.


setStartupMode

@Configurable
public void setStartupMode(DeployMode mode)
                    throws ConfigException
Sets the startup mode.

Throws:
ConfigException

getStartupMode

public DeployMode getStartupMode()
                          throws ConfigException
Gets the startup mode.

Throws:
ConfigException

setRedeployMode

public void setRedeployMode(DeployMode mode)
                     throws ConfigException
Sets the redeploy mode.

Throws:
ConfigException

getRedeployMode

public DeployMode getRedeployMode()
                           throws ConfigException
Gets the redeploy mode.

Throws:
ConfigException

init

@PostConstruct
public final void init()
                throws ConfigException
Throws:
ConfigException

initImpl

protected void initImpl()
Derived class implementation of init


isModified

public boolean isModified()
Returns true if the deployment has modified.

Specified by:
isModified in interface Dependency

logModified

public boolean logModified(java.util.logging.Logger log)
Returns true if the deployment has modified.

Specified by:
logModified in interface Dependency

getState

public java.lang.String getState()

start

public final void start()
Starts the deployment.


isActive

public boolean isActive()

isDestroyed

public boolean isDestroyed()

startImpl

protected void startImpl()
Derived class implentation of start.


updateIfModified

public void updateIfModified()
lazy-start


update

public void update()
Forces an update.


fillDeployedNames

protected void fillDeployedNames(java.util.Set<java.lang.String> names)
Returns the deployed names.


generateController

protected void generateController(java.lang.String name,
                                  java.util.ArrayList<E> controllers)
Generates the controller.


mergeController

protected void mergeController(E controller,
                               java.lang.String name)
Merges the entry with other matching entries, returning the new entry.


getLog

protected java.util.logging.Logger getLog()
Returns the log.


stop

public final void stop()
Stops the deploy


stopImpl

protected void stopImpl()
Derived class implentation of stop.


getConfigException

public java.lang.Throwable getConfigException()

destroy

public final void destroy()
Closes the deploy


destroyImpl

protected void destroyImpl()
Derived class implentation of destroy.


environmentConfigure

public void environmentConfigure(EnvironmentClassLoader loader)
Handles the case where the environment is configuring (after init).

Specified by:
environmentConfigure in interface EnvironmentListener

environmentBind

public void environmentBind(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).

Specified by:
environmentBind in interface EnvironmentListener

environmentStart

public void environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).

Specified by:
environmentStart in interface EnvironmentListener

environmentStop

public void environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping

Specified by:
environmentStop in interface EnvironmentListener

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object