com.caucho.server.deploy
Class DeployGenerator<E extends DeployController>

java.lang.Object
  extended by com.caucho.server.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 DeployController>
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 fillDeployedKeys(java.util.Set<java.lang.String> keys)
          Returns the deployed keys.
protected  E generateController(java.lang.String key)
          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.
 java.lang.String getRedeployMode()
          Gets the redeploy mode.
 java.lang.String 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  E mergeController(E controller, java.lang.String key)
          Merges the entry with other matching entries, returning the new entry.
 void request()
          lazy-start
 void setRedeployMode(java.lang.String mode)
          Sets the redeploy mode.
 void setStartupMode(java.lang.String 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.
 
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

public void setStartupMode(java.lang.String mode)
                    throws ConfigException
Sets the startup mode.

Throws:
ConfigException

getStartupMode

public java.lang.String getStartupMode()
                                throws ConfigException
Gets the startup mode.

Throws:
ConfigException

setRedeployMode

public void setRedeployMode(java.lang.String mode)
                     throws ConfigException
Sets the redeploy mode.

Throws:
ConfigException

getRedeployMode

public java.lang.String getRedeployMode()
                                 throws ConfigException
Gets the redeploy mode.

Throws:
ConfigException

init

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.


request

public void request()
lazy-start


update

public void update()
Forces an update.


fillDeployedKeys

protected void fillDeployedKeys(java.util.Set<java.lang.String> keys)
Returns the deployed keys.


generateController

protected E generateController(java.lang.String key)
Generates the controller.


mergeController

protected E mergeController(E controller,
                            java.lang.String key)
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