public abstract class ExpandDeployGenerator<E extends ExpandDeployController<?>> extends DeployGenerator<E> implements AlarmListener, DeployUpdateListener, RepositoryTagListener
Constructor and Description |
---|
ExpandDeployGenerator(java.lang.String id,
DeployContainer<E> container,
Path containerRootDirectory)
Creates the deploy.
|
Modifier and Type | Method and Description |
---|---|
void |
addExpandCleanupFileset(FileSetType include) |
void |
addExpandPreserveFileset(FileSetType exclude) |
void |
addRequireFile(java.lang.String file)
Adds a required file in the expansion.
|
protected void |
afterUpdate() |
protected void |
beforeUpdate() |
protected abstract E |
createController(ExpandVersion version)
Creates a new entry.
|
boolean |
deploy(java.lang.String key)
Deploy the archive.
|
boolean |
equals(java.lang.Object o)
Tests for equality.
|
protected void |
fillDeployedNames(java.util.Set<java.lang.String> names)
Returns the deployed keys.
|
void |
generateController(java.lang.String name,
java.util.ArrayList<E> controllerList)
Finds the matching entry.
|
Path |
getArchiveDirectory()
Gets the war expand directory.
|
Path |
getArchivePath(java.lang.String name)
Returns the location for deploying an archive with the specified name.
|
java.lang.Throwable |
getConfigException(java.lang.String name)
Returns an exception for the named archive or null if there is no exception
|
long |
getDependencyCheckInterval() |
Path |
getExpandDirectory()
Gets the war expand directory.
|
Path |
getExpandPath(java.lang.String key)
Returns the location of an expanded archive, or null if no archive with
the passed name is deployed.
|
java.lang.String |
getExpandPrefix()
Gets the expand prefix.
|
java.lang.String |
getExpandSuffix()
Gets the expand suffix.
|
java.lang.String |
getExtension()
Returns the extension.
|
java.lang.String |
getId() |
protected java.util.logging.Logger |
getLog()
Returns the log.
|
java.lang.String[] |
getNames() |
Path |
getPath()
Gets the default path.
|
java.lang.String |
getPathSuffix()
true if the webapps directory should be an elastic suffix.
|
ExpandVersion |
getPrimaryVersion(java.lang.String key) |
Repository |
getRepository()
The repository
|
void |
handleAlarm(Alarm alarm)
Checks for updates.
|
protected void |
initImpl()
Configuration checks on init.
|
protected boolean |
isDeployedKey(java.lang.String key)
Return true for a matching key.
|
boolean |
isModified()
Returns true if the deployment has modified.
|
boolean |
isVersioning()
Sets true to enable versioning
|
protected java.lang.String |
keyToName(java.lang.String key) |
boolean |
logModified(java.util.logging.Logger log)
Log the reason for modification
|
protected java.lang.String |
nameToKey(java.lang.String name) |
void |
onTagChange(java.lang.String tag) |
void |
onUpdate(java.lang.String tag)
Notification of an update.
|
void |
setArchiveDirectory(Path path)
Sets the war expand dir to check for new archive files.
|
void |
setDependencyCheckInterval(Period period)
Sets the dependency check interval.
|
void |
setEntryNamePrefix(java.lang.String entryNamePrefix) |
void |
setExpandDirectory(Path path)
Sets the war expand dir to check for new applications.
|
void |
setExpandPath(Path path)
Sets the war expand dir to check for new applications.
|
void |
setExpandPrefix(java.lang.String prefix)
Sets the expand prefix to check for new applications.
|
void |
setExpandSuffix(java.lang.String suffix)
Sets the expand suffix to check for new applications.
|
void |
setExtension(java.lang.String extension)
Sets the extension.
|
void |
setMultiversionRouting(boolean isVersioning)
Sets true to enable versioning
|
void |
setPath(Path path)
Sets the deploy directory.
|
void |
setPathSuffix(java.lang.String pathSuffix)
true if the webapps directory should be an elastic suffix.
|
void |
setVersioning(boolean isVersioning)
Sets true to enable versioning
|
boolean |
start(java.lang.String name)
Start the archive.
|
protected void |
startImpl()
Starts the deploy.
|
boolean |
stop(java.lang.String name)
Stop the archive.
|
protected void |
stopImpl()
Stops the deploy.
|
java.lang.String |
toString() |
boolean |
undeploy(java.lang.String name)
Undeploy the archive.
|
void |
update()
Deploys the objects.
|
void |
updateIfModified()
Redeploys if modified.
|
void |
updateIfModifiedNow()
Redeploys if modified.
|
destroy, destroyImpl, environmentBind, environmentConfigure, environmentStart, environmentStop, getConfigException, getDeployContainer, getParentClassLoader, getRedeployMode, getStartupMode, getState, init, isActive, isDestroyed, mergeController, setRedeployMode, setStartupMode, start, stop
public ExpandDeployGenerator(java.lang.String id, DeployContainer<E> container, Path containerRootDirectory)
public java.lang.String getId()
public void setArchiveDirectory(Path path)
public Path getArchiveDirectory()
public Path getArchivePath(java.lang.String name)
name
- a name, without an extensionpublic java.lang.String getPathSuffix()
public void setPathSuffix(java.lang.String pathSuffix)
public void setExpandPath(Path path)
public void setExpandDirectory(Path path)
public Path getExpandDirectory()
public void setDependencyCheckInterval(Period period)
public long getDependencyCheckInterval()
@Configurable public void addExpandCleanupFileset(FileSetType include)
@Configurable public void addExpandPreserveFileset(FileSetType exclude)
public void setExtension(java.lang.String extension) throws ConfigException
ConfigException
public java.lang.String getExtension()
public void setExpandPrefix(java.lang.String prefix) throws ConfigException
ConfigException
public java.lang.String getExpandPrefix()
public void setExpandSuffix(java.lang.String suffix) throws ConfigException
ConfigException
public java.lang.String getExpandSuffix()
public Repository getRepository()
public void setEntryNamePrefix(java.lang.String entryNamePrefix)
public Path getPath()
public void setPath(Path path)
public void addRequireFile(java.lang.String file) throws ConfigException
ConfigException
public void setVersioning(boolean isVersioning)
public void setMultiversionRouting(boolean isVersioning)
public boolean isVersioning()
protected java.util.logging.Logger getLog()
getLog
in class DeployGenerator<E extends ExpandDeployController<?>>
protected void initImpl() throws ConfigException
initImpl
in class DeployGenerator<E extends ExpandDeployController<?>>
ConfigException
protected void startImpl()
startImpl
in class DeployGenerator<E extends ExpandDeployController<?>>
public Path getExpandPath(java.lang.String key)
key
- a name, without an extensionpublic boolean isModified()
isModified
in interface Dependency
isModified
in class DeployGenerator<E extends ExpandDeployController<?>>
public boolean logModified(java.util.logging.Logger log)
logModified
in interface Dependency
logModified
in class DeployGenerator<E extends ExpandDeployController<?>>
protected void fillDeployedNames(java.util.Set<java.lang.String> names)
fillDeployedNames
in class DeployGenerator<E extends ExpandDeployController<?>>
protected boolean isDeployedKey(java.lang.String key)
protected abstract E createController(ExpandVersion version)
protected java.lang.String keyToName(java.lang.String key)
protected java.lang.String nameToKey(java.lang.String name)
public void updateIfModified()
updateIfModified
in class DeployGenerator<E extends ExpandDeployController<?>>
public void updateIfModifiedNow()
public final void update()
update
in class DeployGenerator<E extends ExpandDeployController<?>>
protected void beforeUpdate()
protected void afterUpdate()
public ExpandVersion getPrimaryVersion(java.lang.String key)
public final void generateController(java.lang.String name, java.util.ArrayList<E> controllerList)
generateController
in class DeployGenerator<E extends ExpandDeployController<?>>
public void onUpdate(java.lang.String tag)
DeployUpdateListener
onUpdate
in interface DeployUpdateListener
public java.lang.String[] getNames()
public boolean deploy(java.lang.String key)
public boolean start(java.lang.String name)
public java.lang.Throwable getConfigException(java.lang.String name)
public boolean stop(java.lang.String name)
public boolean undeploy(java.lang.String name)
public void onTagChange(java.lang.String tag)
onTagChange
in interface RepositoryTagListener
public void handleAlarm(Alarm alarm)
handleAlarm
in interface AlarmListener
protected void stopImpl()
stopImpl
in class DeployGenerator<E extends ExpandDeployController<?>>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class DeployGenerator<E extends ExpandDeployController<?>>