com.caucho.server.deploy
Class ExpandDeployController<I extends DeployInstance>

java.lang.Object
  extended by com.caucho.server.deploy.DeployController<I>
      extended by com.caucho.server.deploy.ExpandDeployController<I>
All Implemented Interfaces:
AlarmListener, Dependency, java.util.EventListener
Direct Known Subclasses:
AppClientDeployController, EnvironmentDeployController

public abstract class ExpandDeployController<I extends DeployInstance>
extends DeployController<I>

A deployment entry that expands from an archive (Jar/Zip) file.


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
protected ExpandDeployController(java.lang.String id)
           
protected ExpandDeployController(java.lang.String id, java.lang.ClassLoader loader, Path rootDirectory)
           
 
Method Summary
protected  void addManifestClassPath()
          Adds any class path from the manifest.
 boolean equals(java.lang.Object o)
          Returns equality.
protected  void expandArchive()
          Expand an archive file.
 Path getArchivePath()
          Gets the archive path.
 GitRepository getGit()
          The Git repository
 Path getGitRefPath()
          The Git ref path
 java.util.jar.Manifest getManifest()
          Returns the manifest.
 java.util.Map<java.lang.String,java.lang.String> getManifestAttributes()
          Returns the manifest as an attribute map
 Path getRootDirectory()
          Gets the root directory
 int hashCode()
          Returns the hash code.
protected  void mergeController(DeployController oldControllerV)
          Merges with the old controller.
protected  void removeExpandDirectory(Path path)
          Recursively remove all files in a directory.
protected  void removeExpandDirectory(Path path, java.lang.String prefix)
          Recursively remove all files in a directory.
protected  void removeExpandFile(Path path, java.lang.String prefix)
          Removes an expanded file.
 void setArchivePath(Path path)
          Sets the archive path.
 void setExpandCleanupFileSet(FileSetType fileSet)
          Sets the archive auto-remove file set.
 void setGit(GitRepository git)
          The Git repository
 void setGitRefPath(Path path)
          The Git ref path
 void setManifestClassLoader(DynamicClassLoader loader)
          Sets the manifest class loader.
protected  void setRootDirectory(Path rootDirectory)
          Sets the root directory
 
Methods inherited from class com.caucho.server.deploy.DeployController
addLifecycleListener, configureInstance, destroy, getConfigException, getDeployAdmin, getDeployInstance, getId, getLog, getMBeanId, getMBeanTypeName, getParentClassLoader, getRedeployCheckInterval, getRedeployMode, getStartTime, getStartupMode, getStartupPriority, getState, handleAlarm, init, initBegin, initEnd, instantiateDeployInstance, isActive, isActiveIdle, isDestroyed, isError, isErrorNow, isModified, isModifiedNow, isNameMatch, isStopped, isStoppedLazy, logModified, mergeRedeployCheckInterval, mergeRedeployMode, mergeStartupMode, request, restart, setRedeployCheckInterval, setRedeployMode, setStartupMode, setStartupPriority, start, startImpl, startOnInit, stop, subrequest, toRedeployCode, toStartupCode, toString, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpandDeployController

protected ExpandDeployController(java.lang.String id)

ExpandDeployController

protected ExpandDeployController(java.lang.String id,
                                 java.lang.ClassLoader loader,
                                 Path rootDirectory)
Method Detail

getRootDirectory

public Path getRootDirectory()
Gets the root directory


setRootDirectory

protected void setRootDirectory(Path rootDirectory)
Sets the root directory


getArchivePath

public Path getArchivePath()
Gets the archive path.


setArchivePath

public void setArchivePath(Path path)
Sets the archive path.


getGit

public GitRepository getGit()
The Git repository


setGit

public void setGit(GitRepository git)
The Git repository


getGitRefPath

public Path getGitRefPath()
The Git ref path


setGitRefPath

public void setGitRefPath(Path path)
The Git ref path


getManifest

public java.util.jar.Manifest getManifest()
Returns the manifest.


getManifestAttributes

public java.util.Map<java.lang.String,java.lang.String> getManifestAttributes()
Returns the manifest as an attribute map


setManifestClassLoader

public void setManifestClassLoader(DynamicClassLoader loader)
Sets the manifest class loader.


setExpandCleanupFileSet

public void setExpandCleanupFileSet(FileSetType fileSet)
Sets the archive auto-remove file set.


mergeController

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

Overrides:
mergeController in class DeployController<I extends DeployInstance>

expandArchive

protected void expandArchive()
                      throws java.io.IOException
Expand an archive file. The _archiveExpandLock must be obtained before the expansion.

Overrides:
expandArchive in class DeployController<I extends DeployInstance>
Throws:
java.io.IOException

addManifestClassPath

protected void addManifestClassPath()
                             throws java.io.IOException
Adds any class path from the manifest.

Overrides:
addManifestClassPath in class DeployController<I extends DeployInstance>
Throws:
java.io.IOException

removeExpandDirectory

protected void removeExpandDirectory(Path path)
Recursively remove all files in a directory. Used for wars when they change.

Parameters:
path - root directory to start removal

removeExpandDirectory

protected void removeExpandDirectory(Path path,
                                     java.lang.String prefix)
Recursively remove all files in a directory. Used for wars when they change.

Parameters:
dir - root directory to start removal

removeExpandFile

protected void removeExpandFile(Path path,
                                java.lang.String prefix)
                         throws java.io.IOException
Removes an expanded file.

Throws:
java.io.IOException

hashCode

public int hashCode()
Returns the hash code.

Overrides:
hashCode in class java.lang.Object

equals

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

Overrides:
equals in class java.lang.Object