com.caucho.server.host
Class HostController

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<Host,HostConfig>
              extended by com.caucho.server.host.HostController
All Implemented Interfaces:
EnvironmentListener, AlarmListener, Dependency, java.util.EventListener

public class HostController
extends EnvironmentDeployController<Host,HostConfig>

A configuration entry for a host


Nested Class Summary
 class HostController.TestVar
          EL variables for the host, when testing for regexp identity .
 class HostController.Var
          EL variables for the host.
 
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
 
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.
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.
protected  HostController merge(HostController newController)
          Merges two entries.
protected  void mergeController(DeployController oldControllerV)
          Merges with the old controller.
 void setContainer(HostContainer container)
           
 void setHostName(java.lang.String name)
          Sets the host's canonical name
 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.server.deploy.EnvironmentDeployController
addConfigDefault, configureInstanceVariables, destroy, environmentBind, environmentConfigure, environmentStart, environmentStop, fillInitList, getArchivePath, getConfig, getConfigException, getMBean, getObjectName, getPrologue, getVariableMap, initEnd, setConfig, setConfigException, setPrologue
 
Methods inherited from class com.caucho.server.deploy.ExpandDeployController
addManifestClassPath, 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, getDeployInstance, getId, getMBeanTypeName, getParentClassLoader, getRedeployCheckInterval, getRedeployMode, getStartTime, getStartupMode, getStartupPriority, getState, handleAlarm, init, 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
 

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


setHostName

public void setHostName(java.lang.String name)
Sets 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


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 DeployController<Host>

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 DeployController<Host>

isNameMatch

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

Overrides:
isNameMatch in class EnvironmentDeployController<Host,HostConfig>

merge

protected HostController merge(HostController newController)
Merges two entries.


mergeController

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

Overrides:
mergeController 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.Throwable
Creates the host.

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

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>