com.caucho.server.host
Class HostController

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<Host,HostConfig>
              extended by com.caucho.server.host.HostController
All Implemented Interfaces:
DeployActionHandler, DeployControllerApi<Host>, RepositoryTagListener, EnvironmentListener, Dependency

public class HostController
extends EnvironmentDeployController<Host,HostConfig>

A configuration entry for a host


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
HostController(java.lang.String id, Path rootDirectory, java.lang.String hostName, HostContainer container)
           
 
Method Summary
 void addDepend(Path depend)
          Adds a dependent file.
 void addExtHostAlias(java.lang.String name)
          Adds an extension host alias, e.g.
 void addExtHostAliasRegexp(java.util.regex.Pattern name)
          Adds an extension host alias, e.g.
 void addHostAlias(java.lang.String name)
          Adds a host alias.
protected  void configureInstance(Host host)
          Creates the host.
 boolean equals(java.lang.Object o)
          Returns equality.
protected  void extendJMXContext(java.util.Map<java.lang.String,java.lang.String> context)
           
 HostMXBean getAdmin()
          Returns the host admin.
 DeployControllerType getControllerType()
          Returns the controller type
protected  DeployControllerAdmin getDeployAdmin()
          Returns the deploy admin.
 java.util.ArrayList<java.lang.String> getHostAliases()
          Returns the host aliases.
 java.lang.String getHostName()
          Returns the host's canonical name
protected  java.util.logging.Logger getLog()
          Returns the appropriate log for debugging.
protected  java.lang.String getMBeanId()
          Returns the "name" property.
 java.lang.String getName()
          Returns the Resin host name.
protected  void initBegin()
          Initialize the entry.
protected  Host instantiateDeployInstance()
          Creates a new instance of the host object.
 boolean isNameMatch(java.lang.String name)
          Returns true for a matching name.
 void merge(DeployControllerApi<Host> newControllerV)
          Merges with the old controller.
 void setContainer(HostContainer container)
           
 void setRegexp(java.util.regex.Pattern regexp)
          Sets the regexp pattern
 void setRegexpName(java.lang.String name)
          Returns the host's canonical name
 void setRootDirectoryPattern(java.lang.String rootDirectoryPattern)
          Sets the root directory pattern
 java.lang.String toString()
          Returns a printable view.
 
Methods inherited from class com.caucho.env.deploy.EnvironmentDeployController
addConfigDefault, configureInstanceVariables, destroy, environmentBind, environmentConfigure, environmentStart, environmentStop, fillInitList, getArchivePath, getConfig, getConfigException, getErrorMessage, getMBean, getMBeanTypeName, getObjectName, getPrologue, getRepositoryMetaData, getVariableMap, initEnd, setConfig, setConfigException, setPrologue
 
Methods inherited from class com.caucho.env.deploy.ExpandDeployController
addDependencies, addExpandCleanupFileSet, addExpandPreserveFileset, addManifestClassPath, controllerLogModified, deploy, deployImpl, 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, getDeployInstance, getDeployInstanceImpl, getId, getIdKey, getIdStage, getIdType, getParentClassLoader, getRedeployCheckInterval, getRedeployMode, getStartTime, getStartupMode, getStartupPriority, getState, init, 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

HostController

public HostController(java.lang.String id,
                      Path rootDirectory,
                      java.lang.String hostName,
                      HostContainer container)
Method Detail

setContainer

public void setContainer(HostContainer container)

getName

public java.lang.String getName()
Returns the Resin host name.


getHostName

public java.lang.String getHostName()
Returns the host's canonical name


setRegexpName

public void setRegexpName(java.lang.String name)
Returns the host's canonical name


addHostAlias

public void addHostAlias(java.lang.String name)
Adds a host alias.


addExtHostAlias

public void addExtHostAlias(java.lang.String name)
Adds an extension host alias, e.g. from a resin:import


getHostAliases

public java.util.ArrayList<java.lang.String> getHostAliases()
Returns the host aliases.


addExtHostAliasRegexp

public void addExtHostAliasRegexp(java.util.regex.Pattern name)
Adds an extension host alias, e.g. from a resin:import


setRegexp

public void setRegexp(java.util.regex.Pattern regexp)
Sets the regexp pattern


getControllerType

public DeployControllerType getControllerType()
Description copied from interface: DeployControllerApi
Returns the controller type

Specified by:
getControllerType in interface DeployControllerApi<Host>
Overrides:
getControllerType in class DeployController<Host>

setRootDirectoryPattern

public void setRootDirectoryPattern(java.lang.String rootDirectoryPattern)
Sets the root directory pattern


addDepend

public void addDepend(Path depend)
Adds a dependent file.


getAdmin

public HostMXBean getAdmin()
Returns the host admin.


getDeployAdmin

protected DeployControllerAdmin getDeployAdmin()
Returns the deploy admin.

Overrides:
getDeployAdmin in class EnvironmentDeployController<Host,HostConfig>

initBegin

protected void initBegin()
Initialize the entry.

Overrides:
initBegin in class DeployController<Host>

getMBeanId

protected java.lang.String getMBeanId()
Returns the "name" property.

Overrides:
getMBeanId in class EnvironmentDeployController<Host,HostConfig>

isNameMatch

public boolean isNameMatch(java.lang.String name)
Returns true for a matching name.

Specified by:
isNameMatch in interface DeployControllerApi<Host>
Overrides:
isNameMatch in class EnvironmentDeployController<Host,HostConfig>

merge

public void merge(DeployControllerApi<Host> newControllerV)
Merges with the old controller.

Specified by:
merge in interface DeployControllerApi<Host>
Overrides:
merge in class EnvironmentDeployController<Host,HostConfig>

instantiateDeployInstance

protected Host instantiateDeployInstance()
Creates a new instance of the host object.

Specified by:
instantiateDeployInstance in class DeployController<Host>

configureInstance

protected void configureInstance(Host host)
                          throws java.lang.Exception
Creates the host.

Overrides:
configureInstance in class EnvironmentDeployController<Host,HostConfig>
Throws:
java.lang.Exception

extendJMXContext

protected void extendJMXContext(java.util.Map<java.lang.String,java.lang.String> context)
Overrides:
extendJMXContext in class EnvironmentDeployController<Host,HostConfig>

getLog

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

Overrides:
getLog in class DeployController<Host>

equals

public boolean equals(java.lang.Object o)
Returns equality.

Overrides:
equals in class ExpandDeployController<Host>

toString

public java.lang.String toString()
Returns a printable view.

Overrides:
toString in class EnvironmentDeployController<Host,HostConfig>