com.caucho.env.deploy
Class EnvironmentDeployController<I extends EnvironmentDeployInstance,C extends DeployConfig>

java.lang.Object
  extended by com.caucho.env.deploy.DeployController<I>
      extended by com.caucho.env.deploy.ExpandDeployController<I>
          extended by com.caucho.env.deploy.EnvironmentDeployController<I,C>
All Implemented Interfaces:
DeployActionHandler, DeployControllerApi<I>, RepositoryTagListener, EnvironmentListener, Dependency
Direct Known Subclasses:
EarDeployController, HostController, WebAppController

public abstract class EnvironmentDeployController<I extends EnvironmentDeployInstance,C extends DeployConfig>
extends ExpandDeployController<I>
implements EnvironmentListener

A deploy controller for an environment.


Field Summary
 
Fields inherited from class com.caucho.env.deploy.ExpandDeployController
APPLICATION_HASH_PATH
 
Fields inherited from class com.caucho.env.deploy.DeployController
_lifecycle, REDEPLOY_CHECK_INTERVAL
 
Constructor Summary
EnvironmentDeployController(java.lang.String id, Path rootDirectory)
           
EnvironmentDeployController(java.lang.String id, Path rootDirectory, C config, DeployContainerApi<?> container)
           
 
Method Summary
 void addConfigDefault(C config)
          Adds a default config.
protected  void configureInstance(I instance)
          Configures the instance.
protected  void configureInstanceVariables(I instance)
           
 boolean destroy()
          Returns the application object.
 void environmentBind(EnvironmentClassLoader loader)
          Handles bind phase.
 void environmentConfigure(EnvironmentClassLoader loader)
          Handles config phase.
 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 extendJMXContext(java.util.Map<java.lang.String,java.lang.String> context)
           
protected  void fillInitList(java.util.ArrayList<DeployConfig> initList)
           
 Path getArchivePath()
          Gets the archive path.
 C getConfig()
          Gets the primary configuration
 java.lang.Throwable getConfigException()
          Returns the configure exception.
protected  DeployControllerAdmin<?> getDeployAdmin()
           
 java.lang.String getErrorMessage()
          Returns the error message
 java.lang.Object getMBean()
          Returns the mbean.
protected  java.lang.String getMBeanId()
           
protected  java.lang.String getMBeanTypeName()
           
 javax.management.ObjectName getObjectName()
          Returns the object name.
 DeployConfig getPrologue()
          Gets the prologue configuration
 java.util.Map<java.lang.String,java.lang.String> getRepositoryMetaData()
           
 java.util.HashMap<java.lang.String,java.lang.Object> getVariableMap()
          Returns the path variable map.
protected  void initEnd()
          Initialize the controller.
 boolean isNameMatch(java.lang.String url)
          Returns true if the entry matches.
 void merge(DeployControllerApi<I> oldControllerV)
          Merges with the old controller.
 void setConfig(C config)
          Sets the primary configuration.
 void setConfigException(java.lang.Throwable e)
          Sets a parent config exception (e.g.
 void setPrologue(DeployConfig prologue)
          Sets the prologue configuration
 java.lang.String toString()
          Returns a printable view.
 
Methods inherited from class com.caucho.env.deploy.ExpandDeployController
addDependencies, addExpandCleanupFileSet, addExpandPreserveFileset, addManifestClassPath, controllerLogModified, deploy, deployImpl, equals, getAutoDeployStage, getAutoDeployTag, getManifest, getManifestAttributes, getRepository, getRootDirectory, getVersionDependency, hashCode, isAllowRepository, isControllerModified, isControllerModifiedNow, onActive, onDestroy, onError, onStop, onTagChange, postConfigureInstance, postExtract, preConfigureInstance, removeExpandDirectory, removeExpandDirectory, removeExpandFile, setAllowRepository, setArchivePath, setDependencyCheckInterval, setRootDirectory, setVersionDependency
 
Methods inherited from class com.caucho.env.deploy.DeployController
addLifecycleListener, alarm, close, createDeployInstance, destroyInstance, getActiveDeployInstance, getActiveWaitTime, getControllerType, getDeployInstance, getDeployInstanceImpl, getId, getIdKey, getIdStage, getIdType, getLog, getParentClassLoader, getRedeployCheckInterval, getRedeployMode, getStartTime, getStartupMode, getStartupPriority, getState, init, initBegin, instantiateDeployInstance, isIdleTimeout, isModified, isModifiedNow, logModified, mergeRedeployCheckInterval, mergeRedeployMode, onStartComplete, request, restart, setActiveWaitTimeMillis, setControllerType, setRedeployCheckInterval, setRedeployMode, setStartupMode, setStartupPriority, start, startImpl, startOnInit, stop, stopImpl, stopLazyImpl, subrequest, toRestart, toStart, toStop, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnvironmentDeployController

public EnvironmentDeployController(java.lang.String id,
                                   Path rootDirectory)

EnvironmentDeployController

public EnvironmentDeployController(java.lang.String id,
                                   Path rootDirectory,
                                   C config,
                                   DeployContainerApi<?> container)
Method Detail

setConfig

public void setConfig(C config)
Sets the primary configuration.


getConfig

public C getConfig()
Gets the primary configuration


getPrologue

public DeployConfig getPrologue()
Gets the prologue configuration


setPrologue

public void setPrologue(DeployConfig prologue)
Sets the prologue configuration


getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message


getConfigException

public java.lang.Throwable getConfigException()
Returns the configure exception.

Overrides:
getConfigException in class ExpandDeployController<I extends EnvironmentDeployInstance>

addConfigDefault

public void addConfigDefault(C config)
Adds a default config.


getVariableMap

public java.util.HashMap<java.lang.String,java.lang.Object> getVariableMap()
Returns the path variable map.


getMBean

public java.lang.Object getMBean()
Returns the mbean.


getObjectName

public javax.management.ObjectName getObjectName()
Returns the object name.


setConfigException

public void setConfigException(java.lang.Throwable e)
Sets a parent config exception (e.g. from a .ear)


initEnd

protected void initEnd()
Initialize the controller.

Overrides:
initEnd in class ExpandDeployController<I extends EnvironmentDeployInstance>

isNameMatch

public boolean isNameMatch(java.lang.String url)
Returns true if the entry matches.

Specified by:
isNameMatch in interface DeployControllerApi<I extends EnvironmentDeployInstance>
Overrides:
isNameMatch in class DeployController<I extends EnvironmentDeployInstance>

getMBeanTypeName

protected java.lang.String getMBeanTypeName()

getMBeanId

protected java.lang.String getMBeanId()

merge

public void merge(DeployControllerApi<I> oldControllerV)
Merges with the old controller.

Specified by:
merge in interface DeployControllerApi<I extends EnvironmentDeployInstance>
Overrides:
merge in class ExpandDeployController<I extends EnvironmentDeployInstance>

getDeployAdmin

protected DeployControllerAdmin<?> getDeployAdmin()

destroy

public boolean destroy()
Returns the application object.

Overrides:
destroy in class DeployController<I extends EnvironmentDeployInstance>

configureInstance

protected void configureInstance(I instance)
                          throws java.lang.Exception
Configures the instance.

Overrides:
configureInstance in class ExpandDeployController<I extends EnvironmentDeployInstance>
Throws:
java.lang.Exception

extendJMXContext

protected void extendJMXContext(java.util.Map<java.lang.String,java.lang.String> context)

fillInitList

protected void fillInitList(java.util.ArrayList<DeployConfig> initList)

configureInstanceVariables

protected void configureInstanceVariables(I instance)

getRepositoryMetaData

public java.util.Map<java.lang.String,java.lang.String> getRepositoryMetaData()

getArchivePath

public Path getArchivePath()
Description copied from class: ExpandDeployController
Gets the archive path.

Overrides:
getArchivePath in class ExpandDeployController<I extends EnvironmentDeployInstance>

environmentConfigure

public void environmentConfigure(EnvironmentClassLoader loader)
Handles config phase.

Specified by:
environmentConfigure in interface EnvironmentListener

environmentBind

public void environmentBind(EnvironmentClassLoader loader)
Handles bind phase.

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()
Returns a printable view.

Overrides:
toString in class DeployController<I extends EnvironmentDeployInstance>