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

java.lang.Object
  extended by com.caucho.server.deploy.DeployController<I>
      extended by com.caucho.server.deploy.ExpandDeployController<I>
          extended by com.caucho.server.deploy.EnvironmentDeployController<I,C>
All Implemented Interfaces:
EnvironmentListener, AlarmListener, Dependency, java.util.EventListener
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.server.deploy.DeployController
_lifecycle, REDEPLOY_AUTOMATIC, REDEPLOY_CHECK_INTERVAL, REDEPLOY_DEFAULT, REDEPLOY_LAZY, REDEPLOY_MANUAL, STARTUP_AUTOMATIC, STARTUP_DEFAULT, STARTUP_LAZY, STARTUP_MANUAL
 
Constructor Summary
EnvironmentDeployController()
           
EnvironmentDeployController(C config)
           
EnvironmentDeployController(java.lang.String id, C config)
           
EnvironmentDeployController(java.lang.String id, Path rootDirectory)
           
 
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.
 java.lang.Object getMBean()
          Returns the mbean.
 javax.management.ObjectName getObjectName()
          Returns the object name.
 DeployConfig getPrologue()
          Gets the prologue configuration
 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.
protected  void mergeController(DeployController 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.server.deploy.ExpandDeployController
addManifestClassPath, equals, expandArchive, getGit, getGitRefPath, getManifest, getManifestAttributes, getRootDirectory, hashCode, removeExpandDirectory, removeExpandDirectory, removeExpandFile, setArchivePath, setExpandCleanupFileSet, setGit, setGitRefPath, setManifestClassLoader, setRootDirectory
 
Methods inherited from class com.caucho.server.deploy.DeployController
addLifecycleListener, getDeployAdmin, getDeployInstance, getId, getLog, getMBeanId, getMBeanTypeName, getParentClassLoader, getRedeployCheckInterval, getRedeployMode, getStartTime, getStartupMode, getStartupPriority, getState, handleAlarm, init, initBegin, instantiateDeployInstance, isActive, isActiveIdle, isDestroyed, isError, isErrorNow, isModified, isModifiedNow, isStopped, isStoppedLazy, logModified, mergeRedeployCheckInterval, mergeRedeployMode, mergeStartupMode, request, restart, setRedeployCheckInterval, setRedeployMode, setStartupMode, setStartupPriority, start, startImpl, startOnInit, stop, subrequest, toRedeployCode, toStartupCode, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnvironmentDeployController

public EnvironmentDeployController()

EnvironmentDeployController

public EnvironmentDeployController(C config)

EnvironmentDeployController

public EnvironmentDeployController(java.lang.String id,
                                   C config)

EnvironmentDeployController

public EnvironmentDeployController(java.lang.String id,
                                   Path rootDirectory)
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


getConfigException

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

Overrides:
getConfigException in class DeployController<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 DeployController<I extends EnvironmentDeployInstance>

isNameMatch

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

Overrides:
isNameMatch in class DeployController<I extends EnvironmentDeployInstance>

mergeController

protected void mergeController(DeployController oldControllerV)
Merges with the old controller.

Overrides:
mergeController in class ExpandDeployController<I extends EnvironmentDeployInstance>

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.Throwable
Configures the instance.

Overrides:
configureInstance in class DeployController<I extends EnvironmentDeployInstance>
Throws:
java.lang.Throwable

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)
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

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>