public abstract class AbstractContainer extends AbstractGridLibExtension implements Container
AbstractContainer
class provides a basic implementation of the Container
interface, along with five abstract methods for subclasses to implement in order to customize the
Enabler lifecycle.
When asked to start a Component, this Enabler constructs a runtime context which is a union of runtime context templates of the Enabler and Component. The variables are installed in the above order, so Component variables overwrite Enabler variables.
The Enabler also sets all variables of type RuntimeContextVariable.SYSTEM_TYPE
as Java
system properties in the system classloader.
In addition to configuring variables, the Enabler takes care of processing the configure.xml
configuration file, which specifies changes to be performed to files in the Enabler working directory.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractContainer.DEACTIVATION_CODES
Deactivation codes
|
Container.Listener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALLOW_MULTIPLE_ARCHIVE_INSTANCES_VAR |
protected static java.lang.String |
ALTERNATE_REDIRECT_ADDRESS_PROPERTY |
protected static java.lang.String |
ALTERNATE_ROUTING_ADDRESS_PROPERTY |
static java.text.SimpleDateFormat |
APPLICATION_LOG_DATE_FORMAT |
protected static java.lang.String |
APPLICATION_SESSION_IDENTIFIER_NAME_VAR |
protected static java.lang.String |
APPLICATION_SESSION_IDENTIFIER_VAR |
static java.lang.String |
ARCHIVE_DETECTION_ENABLED_VAR |
static java.lang.String |
ARCHIVE_DETECTION_FREQUENCY_VAR |
static java.lang.String |
ARCHIVE_DETECTION_IGNORED_ARCHIVES_VAR |
static java.lang.String |
ARCHIVE_DETECTION_IGNORED_URLS_VAR |
protected static java.lang.String |
BALANCER_STRATEGY_VAR |
protected static java.lang.String |
CONTEXT_AWARE_ROUTING_PATTERN_VAR |
protected static java.lang.String |
COPY_DEPENDENCIES_TO_WORK_DIRECTORY_VAR |
protected static java.lang.String |
DELETE_RUNTIME_DIR_ON_SHUTDOWN_VAR |
static java.lang.String |
DYNAMIC_GRIDLIB_DEPENDENCIES |
protected static java.lang.String |
LISTEN_ADDRESS_NET_MASK_VAR |
protected static java.lang.String |
LISTEN_ADDRESS_VAR |
static int |
MIN_ARCHIVE_DETECTION_FREQUENCY_IN_SECONDS |
static java.lang.String |
PATCH_GRID_LIBRARIES_VAR |
protected static java.lang.String |
REDIRECT_TO_ENDPOINTS_VAR |
protected static java.lang.String |
SESSION_IDENTIFIER_NAME_VAR |
protected static java.lang.String |
SESSION_IDENTIFIER_VAR |
protected static java.lang.String |
SESSION_TAKES_PRECEDENCE_OVER_CONTEXT_AWARE_ROUTING_VAR |
protected static java.lang.String |
STATISTIC_BASED_ROUTING_LIMIT_VAR |
protected static java.lang.String |
STATISTIC_BASED_ROUTING_SCALE_DIRECTION_VAR |
protected static java.lang.String |
STATISTIC_BASED_ROUTING_STAT_NAME_VAR |
scriptStatisticsProvider
CONTAINER_FILE
CONTENT_ARCHIVE_DIR, CONTENT_DIR, CONTENT_FILE, DESCRIPTION_PROPERTY, NAME_PROPERTY, RUNTIME_CONTEXT_PROPERTY, SCRIPT_PROPERTY, SCRIPT_STATISTIC_PROPERTY
Modifier and Type | Method and Description |
---|---|
void |
addListener(Container.Listener l)
Add a listener to this Enabler.
|
void |
addScriptProvidedStatistic(StatisticsMetadata scriptStat)
Add a script provided statistic to this GridLibExtension.
|
void |
addStatisticsProvider(StatisticsProvider provider)
Add a Statistics Provider to this Enabler.
|
void |
addSupportedDomainType(java.lang.String type)
Adds a supported Component Type to this Enabler.
|
void |
addSupportedFeature(Feature feature)
Add a supported feature to this Enabler
|
void |
applyPatch(GridlibInfo[] gridlibInfos)
Applies the given patches to the Enabler.
|
protected void |
archiveApplicationLogs()
Archive application log files, providing the Enabler supports the ApplicationLogging feature
and it is enabled in the Component.
|
void |
capture()
Capture the current Component running on the Engine.
|
void |
checkpointApplicationLogs()
Create checkpoint copies of active application log files, providing the Enabler supports the ApplicationLogging feature
and it is enabled in the Component.
|
void |
cleanup()
The
cleanup() method is called after the doShutdown() method and
deletes the work directory unless the runtime variable DELETE_RUNTIME_DIR_ON_SHUTDOWN is false. |
void |
componentNotification(java.lang.String componentName,
java.util.List<NotificationEngineInfo> notificationEngineInfo)
This method is called to notify the Enabler that a Component that it is interested in has changed.
|
protected void |
configureContainer(VelocityContext velocityContext) |
protected void |
confirmShutdown(RuntimeContext serverContext)
This method is called after the shutdown procedure is complete.
|
static void |
copyDirNio(java.io.File from,
java.io.File to) |
static void |
copyDirNio(java.io.File from,
java.io.File to,
java.io.FileFilter f) |
protected void |
deployArchive(java.io.File archive,
java.io.File deploymentRoot)
Deprecated.
Use ArchiveManagement.archiveDeploy
|
protected void |
deployFileArchive(java.io.File archive,
java.io.File deploymentRoot)
Deprecated.
Use ArchiveManagement.archiveDeploy
|
ArchiveDetail[] |
detectArchives()
Deprecated.
Use ArchiveManagement.archiveDetect()
|
void |
doCapture()
This method is called from the capture method, and is designed to enable you to
customize capture behavior.
|
protected abstract void |
doInit(java.util.List<RuntimeContextVariable> additionalVariables)
The
doInit() method is called prior to doStart() and allows for initialization of
the Enabler. |
protected abstract void |
doInstall(ActivationInfo info)
The
doInstall() method is called after doStart() and allows for the Component to
be installed into the Enabler. |
protected abstract void |
doShutdown()
The
doShutdown() method is called during deactivation after the doUninstall() method
and is responsible for shutting down the Enabler. |
protected abstract void |
doStart()
The
doStart() method is responsible for the actual Enabler startup. |
protected abstract void |
doUninstall()
The
doUninstall() method is called during deactivation. |
void |
drainingStarted()
This method is called when the Engine running the Enabler is put into draining mode.
|
void |
drainingStopped()
This method is called when the Engine running the Enabler is removed from draining mode.
|
ActivationInfo |
getActivationInfo()
Returns a copy of the current ActivationInfo.
|
protected ArchiveManagementFeatureInfo |
getArchiveManagementFeatureInfo() |
ContainerSnapshotSupport |
getContainerSnapshotSupport() |
Domain |
getCurrentDomain()
Get the current Component
|
java.lang.String |
getDistributionVersion()
Get the string containing the version of the distribution used by this Enabler.
|
GridlibInfo[] |
getDynamicGridlibDependencies()
Gets any dynamic Grid Library dependencies required by the Enabler using context variable
DYNAMIC_GRIDLIB_DEPENDENCIES . |
int |
getListenerCount()
Gets the number of registered listeners on this Enabler.
|
boolean |
getMultipleArchiveInstancesAllowed()
If this Enabler supports multiple running instances of the same archive.
|
RunningCondition |
getRunningCondition()
Get the running condition for this Enabler.
|
RuntimeContext |
getRuntimeContext()
Get the runtime context of this Enabler.
|
java.lang.Enum<AbstractContainer.DEACTIVATION_CODES> |
getShutdownReason()
Returns a code representing the reason why the Enabler was shut down.
|
long |
getShutdownTimeout()
Get the timeout in milliseconds for shutting down this Enabler.
|
StartCondition |
getStartCondition()
Get the start condition for this Enabler.
|
StatisticsProvider |
getStatisticsProvider(int i)
Retrieve the i'th statistic provider from this Enabler's list of
statistics providers.
|
int |
getStatisticsProviderCount()
Get the current number of statistics providers for this Enabler.
|
java.lang.String |
getStringVariableValue(java.lang.String var)
Retrieves the String value of the named Variable in the current RuntimeContext.
|
java.lang.String |
getStringVariableValue(java.lang.String var,
java.lang.String defValue)
Retrieves the String value of the named variable in the current RuntimeContext.
|
java.lang.String |
getSupportedDomainType(int idx)
Get a Component type supported by this Enabler.
|
int |
getSupportedDomainTypeCount()
Get the count of the Component types supported by this Enabler.
|
Feature |
getSupportedFeature(int idx)
Get the supported Feature at the specified index
|
int |
getSupportedFeatureCount()
Get the number of Features supported by this Enabler
|
java.lang.String |
getVersion()
Get the String containing the version of this Enabler.
|
java.lang.String |
getWorkDir()
Getter for work directory.
|
int |
hashCode() |
void |
init(Domain domain,
RuntimeContext serverContext)
Initialize this Enabler with the given ServerContext,
and prepare to run given Component.
|
ActivationInfo |
install()
Install the current Component into this Enabler.
|
protected void |
installContent(GridLibExtension ext)
Installs content files from the specified GridLibExtension (Enabler or Component).
|
boolean |
isActivating()
The
isActivating() method is used determine if the Enabler is currently activating a Component. |
boolean |
isComponentInstanceNumberingEnabled()
If the Enabler is using the Component instance number feature.
|
boolean |
isPatchable()
If the Enabler is patchable.
|
void |
notifyListenersOfCrash(java.lang.String errorMessage)
Notify all listeners of an Enabler failure event
|
void |
notifyListenersOfDomainActivation()
Notify all listeners of a Component activation event
|
protected void |
prepareWorkDirectory()
The
prepareWorkDirectory() method is called before the doInit() method. |
void |
removeListener(Container.Listener l)
Remove a listener from this Enabler.
|
void |
removeSupportedDomainType(int idx)
Removes the supported Component Type at the specified index.
|
void |
removeSupportedFeature(int idx)
Remove the supported Feature at the specified index
|
java.io.File |
resolveArchive(java.lang.String deploymentArchiveName,
java.lang.String url,
java.util.Properties properties,
java.lang.String componentName,
java.io.File destDir)
Implement this method in an Enabler to resolve a deployable archive (such as WAR, EAR, or PAR)
in conjunction with the use of a custom URL locator for the purpose of deploying to an active Component.
|
java.lang.String |
resolveVariables(java.lang.String str)
Use the current server context to replace variables in the given string.
|
void |
setComponentInstanceNumberingEnabled(boolean componentInstanceNumberingEnabled) |
void |
setDistributionVersion(java.lang.String distributionVersion)
Sets the version of the distribution on which this Enabler relies.
|
void |
setMultipleArchiveInstancesAllowed(boolean multipleArchiveInstancesAllowed)
Sets if this enabler supports multiple running instances of the same archive.
|
void |
setPatchable(boolean patchable) |
void |
setRunningCondition(RunningCondition runningCondition)
Sets the RunningCondition for this Enabler.
|
void |
setShutdownReason(AbstractContainer.DEACTIVATION_CODES shutdownReason) |
void |
setShutdownTimeout(long shutdownTimeout)
Set the timeout in milliseconds for shutting down this Enabler.
|
void |
setStartCondition(StartCondition startCondition)
Sets the StartCondition for this Enabler.
|
void |
setVersion(java.lang.String version)
Sets the version of this Enabler.
|
void |
setWorkDir(java.lang.String workDir)
Setter for work directory.
|
void |
shutdown(RuntimeContext serverContext)
Shut down current Enabler and clean its environment.
|
void |
shutdown(RuntimeContext serverContext,
boolean capture)
Shut down current Enabler and clean its environment.
|
void |
start()
Start this Enabler using the Component and ServerContext specified in
init . |
boolean |
supportsType(java.lang.String typeName)
Check if the given Component type is supported by this Enabler.
|
java.lang.String |
toString() |
protected void |
undeployArchive(java.lang.String archiveFilename,
java.io.File deploymentRoot)
Deprecated.
Use ArchiveManagement.archiveUndeploy()
|
void |
uninstall(Domain domain)
Uninstall the given Component from this Enabler.
|
void |
updateActivationInfoProperties(ActivationInfo info)
Update the ActivationInfo for this component instance with the properties contained in info.
|
void |
updateVariableProviderVariables()
Updates Variable Provider variables for this Component.
|
addContentFile, addPatch, addScript, closeGridLib, downPatch, equals, getConfigureFile, getContentFile, getContentFileCount, getDescription, getEngineLogger, getGridLibFilename, getGridLibName, getGridLibVersion, getName, getPatch, getPatchCount, getPuppetChefSupport, getRuntimeContextTemplate, getScript, getScriptCount, getScriptDirectory, getScriptProvidedStatistic, getScriptProvidedStatisticCount, getScriptStatisticsProvider, initGridLib, isDeployable, isModified, removeContentFile, removePatch, removeScript, removeScriptProvidedStatistic, setConfigureFile, setDescription, setGridLibFilename, setGridLibName, setGridLibVersion, setModified, setName, setPuppetChefSupport, setRuntimeContextTemplate, setScriptDirectory, setScriptStatisticsProvider, upPatch
getLastModified, getModifiedBy, setLastModified, setModifiedBy
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addContentFile, addPatch, addScript, closeGridLib, downPatch, getConfigureFile, getContentFile, getContentFileCount, getDescription, getGridLibFilename, getGridLibName, getGridLibVersion, getPatch, getPatchCount, getPuppetChefSupport, getRuntimeContextTemplate, getScript, getScriptCount, getScriptProvidedStatistic, getScriptProvidedStatisticCount, getScriptStatisticsProvider, initGridLib, isDeployable, isModified, removeContentFile, removePatch, removeScript, removeScriptProvidedStatistic, setDescription, setGridLibFilename, setGridLibName, setGridLibVersion, setModified, setName, setPuppetChefSupport, setRuntimeContextTemplate, upPatch
getLastModified, getModifiedBy, setLastModified, setModifiedBy
public static final java.text.SimpleDateFormat APPLICATION_LOG_DATE_FORMAT
protected static final java.lang.String LISTEN_ADDRESS_NET_MASK_VAR
protected static final java.lang.String LISTEN_ADDRESS_VAR
protected static final java.lang.String DELETE_RUNTIME_DIR_ON_SHUTDOWN_VAR
protected static final java.lang.String COPY_DEPENDENCIES_TO_WORK_DIRECTORY_VAR
protected static final java.lang.String REDIRECT_TO_ENDPOINTS_VAR
protected static final java.lang.String SESSION_IDENTIFIER_VAR
protected static final java.lang.String SESSION_IDENTIFIER_NAME_VAR
protected static final java.lang.String APPLICATION_SESSION_IDENTIFIER_VAR
protected static final java.lang.String APPLICATION_SESSION_IDENTIFIER_NAME_VAR
protected static final java.lang.String CONTEXT_AWARE_ROUTING_PATTERN_VAR
protected static final java.lang.String BALANCER_STRATEGY_VAR
protected static final java.lang.String SESSION_TAKES_PRECEDENCE_OVER_CONTEXT_AWARE_ROUTING_VAR
protected static final java.lang.String STATISTIC_BASED_ROUTING_STAT_NAME_VAR
protected static final java.lang.String STATISTIC_BASED_ROUTING_LIMIT_VAR
protected static final java.lang.String STATISTIC_BASED_ROUTING_SCALE_DIRECTION_VAR
protected static final java.lang.String ALTERNATE_ROUTING_ADDRESS_PROPERTY
protected static final java.lang.String ALTERNATE_REDIRECT_ADDRESS_PROPERTY
public static final java.lang.String PATCH_GRID_LIBRARIES_VAR
public static final java.lang.String ARCHIVE_DETECTION_ENABLED_VAR
public static final java.lang.String ARCHIVE_DETECTION_FREQUENCY_VAR
public static final java.lang.String ARCHIVE_DETECTION_IGNORED_URLS_VAR
public static final java.lang.String ARCHIVE_DETECTION_IGNORED_ARCHIVES_VAR
public static final int MIN_ARCHIVE_DETECTION_FREQUENCY_IN_SECONDS
public static final java.lang.String ALLOW_MULTIPLE_ARCHIVE_INSTANCES_VAR
public static final java.lang.String DYNAMIC_GRIDLIB_DEPENDENCIES
protected abstract void doInit(java.util.List<RuntimeContextVariable> additionalVariables) throws java.lang.Exception
doInit()
method is called prior to doStart()
and allows for initialization of
the Enabler. Note that this is called prior to configuration of content files.
Implementations can therefore use this method to set additional Variables
to be used at runtime. Additional variables should be added to the provided
additionalVariables parameter.additionalVariables
- List in which to (optionally) add additional Variables.
Objects added to this List will be ignored if they are not
of type com.datasynapse.fabric.common.RuntimeContextVariable.java.lang.Exception
- If there is an error during initialization. This will result
in the activation being aborted and reported as an activation
failure.protected abstract void doStart() throws java.lang.Exception
doStart()
method is responsible for the actual Enabler startup.java.lang.Exception
- if there is an error starting the Enablerprotected abstract void doInstall(ActivationInfo info) throws java.lang.Exception
doInstall()
method is called after doStart()
and allows for the Component to
be installed into the Enabler. The Component to be installed is accessible by
the getCurrentDomain() method.
The provided ActivationInfo object allows for implementations to propagate activation parameters to be propagated to the Broker. For example, if the Enabler supports HTTP, the HTTP or HTTPS ports should be set in this ActivationInfo object.
info
- the ActivationInfo object to which activation parameters may be addedjava.lang.Exception
- if there is an error installing the Component into this Enablerprotected abstract void doUninstall() throws java.lang.Exception
doUninstall()
method is called during deactivation.java.lang.Exception
- if there is an error uninstalling the Componentprotected abstract void doShutdown() throws java.lang.Exception
doShutdown()
method is called during deactivation after the doUninstall()
method
and is responsible for shutting down the Enabler.java.lang.Exception
- if there is an error shutting down the Enablerpublic void cleanup() throws java.lang.Exception
cleanup()
method is called after the doShutdown()
method and
deletes the work directory unless the runtime variable DELETE_RUNTIME_DIR_ON_SHUTDOWN
is false.
Subclasses can optionally override this method to perform any enabler-specific cleanup, such as
deletion of runtime files or directories. Note that this method is called prior to
the cleanup()
method of com.datasynapse.fabric.domain.Domain
public void applyPatch(GridlibInfo[] gridlibInfos) throws java.lang.Exception
Container
applyPatch
in interface Container
gridlibInfos
- the patches to be appliedjava.lang.Exception
- thrown if apply patch fails.public final void init(Domain domain, RuntimeContext serverContext) throws java.lang.Exception
Container
start
method may be called to start the Enabler
with the specified Component and ServerContext.public final void start() throws java.lang.Exception
Container
init
.protected void prepareWorkDirectory() throws java.lang.Exception
prepareWorkDirectory()
method is called before the doInit()
method. It will
delete work and archive directories that may exist from a previous failed activation,
non-recursively copy all first-level Grid Library dependencies to the work directory, and
install the content files to the work directory, but not configure them.
prepareWorkDirectory()
in your Enabler code, you can add a String-type runtime context variable named
COPY_DEPENDENCIES_TO_WORK_DIRECTORY
with the value false to your Enabler or Component.java.lang.Exception
public java.lang.String getWorkDir() throws java.lang.Exception
java.lang.Exception
public void setWorkDir(java.lang.String workDir)
${ENGINE_WORK_DIR}/fabric
.workDir
- the Enabler runtime directory.public ArchiveDetail[] detectArchives() throws java.lang.Exception
java.lang.Exception
public final boolean isActivating()
isActivating()
method is used determine if the Enabler is currently activating a Component. This
can help determine exception handling for archive deployment methods when they are run at startup versus directly from a client.public final ActivationInfo install() throws java.lang.Exception
Container
protected void archiveApplicationLogs() throws java.lang.Exception
java.lang.Exception
- If there is an error.public void checkpointApplicationLogs() throws java.lang.Exception
java.lang.Exception
- If there is an error.public final void uninstall(Domain domain)
Container
protected ArchiveManagementFeatureInfo getArchiveManagementFeatureInfo()
public final void shutdown(RuntimeContext serverContext) throws java.lang.Exception
Container
public final void shutdown(RuntimeContext serverContext, boolean capture) throws java.lang.Exception
Container
public boolean isPatchable()
Container
isPatchable
in interface Container
public void setPatchable(boolean patchable)
public final void capture() throws java.lang.Exception
Container
public void doCapture() throws java.lang.Exception
java.lang.Exception
protected void confirmShutdown(RuntimeContext serverContext) throws java.lang.Exception
serverContext
- the current RuntimeContextjava.lang.Exception
- if there is an errorpublic java.lang.String resolveVariables(java.lang.String str) throws java.lang.Exception
Container
resolveVariables
in interface Container
str
- the string to resolvejava.lang.Exception
- the exception is thrown if resolveVariables failspublic java.lang.String getStringVariableValue(java.lang.String var, java.lang.String defValue) throws java.lang.Exception
var
- the name of the variable to retrievedefValue
- the default value, which will be returned if no variable of name
var is found in the current RuntimeContextjava.lang.Exception
- if there is an error retrieving the variablepublic java.lang.String getStringVariableValue(java.lang.String var) throws java.lang.Exception
var
- the name of the variable to retrievejava.lang.Exception
- if there is an error retrieving the variablepublic void notifyListenersOfCrash(java.lang.String errorMessage)
Container
notifyListenersOfCrash
in interface Container
errorMessage
- a message describing the failurepublic void notifyListenersOfDomainActivation()
Container
notifyListenersOfDomainActivation
in interface Container
public int hashCode()
hashCode
in class AbstractGridLibExtension
protected void deployArchive(java.io.File archive, java.io.File deploymentRoot) throws java.lang.Exception
AbstractContainer
implementations to use a
different deployment mechanism.archive
- the archive file to deploydeploymentRoot
- the directory to deploy the archive tojava.lang.Exception
protected void deployFileArchive(java.io.File archive, java.io.File deploymentRoot) throws java.lang.Exception
AbstractContainer
implementations to use a different deployment
mechanism.archive
- the archive file to deploydeploymentRoot
- the directory to deploy the archive tojava.lang.Exception
protected void undeployArchive(java.lang.String archiveFilename, java.io.File deploymentRoot) throws java.lang.Exception
archiveFilename
- the archive file to deploydeploymentRoot
- the directory to deploy the archive tojava.lang.Exception
protected void configureContainer(VelocityContext velocityContext) throws java.lang.Exception
java.lang.Exception
protected void installContent(GridLibExtension ext) throws java.lang.Exception
ext
- the Enabler or Component to install content files fromjava.lang.Exception
public void setStartCondition(StartCondition startCondition)
startCondition
- the StartCondition to use for this Enablerpublic StartCondition getStartCondition()
Container
getStartCondition
in interface Container
public void setRunningCondition(RunningCondition runningCondition)
runningCondition
- the RunningCondition to use for this Enablerpublic RunningCondition getRunningCondition()
Container
getRunningCondition
in interface Container
public Domain getCurrentDomain()
Container
getCurrentDomain
in interface Container
public RuntimeContext getRuntimeContext()
Container
getRuntimeContext
in interface Container
public void addStatisticsProvider(StatisticsProvider provider)
Container
addStatisticsProvider
in interface Container
provider
- the provider to addpublic int getStatisticsProviderCount()
Container
getStatisticsProviderCount
in interface Container
public StatisticsProvider getStatisticsProvider(int i)
Container
getStatisticsProvider
in interface Container
i
- the index of the provider to retrievepublic void addSupportedFeature(Feature feature)
Container
addSupportedFeature
in interface Container
feature
- the feature add to this Enabler's list of supported featurespublic int getSupportedFeatureCount()
Container
getSupportedFeatureCount
in interface Container
public Feature getSupportedFeature(int idx)
Container
getSupportedFeature
in interface Container
idx
- the index of the Feature to retrievepublic void removeSupportedFeature(int idx)
Container
removeSupportedFeature
in interface Container
idx
- the index of the Feature to removepublic long getShutdownTimeout()
Container
getShutdownTimeout
in interface Container
public void setShutdownTimeout(long shutdownTimeout)
Container
setShutdownTimeout
in interface Container
shutdownTimeout
- set the timeout in milliseconds for shutting down this Enablerpublic final int getSupportedDomainTypeCount()
Container
getSupportedDomainTypeCount
in interface Container
public final java.lang.String getSupportedDomainType(int idx)
Container
getSupportedDomainType
in interface Container
idx
- the index of a Component type supported by this Enablerpublic final void updateActivationInfoProperties(ActivationInfo info)
Container
updateActivationInfoProperties
in interface Container
info
- an ActivationInfo object containing properties to update in this engine's current ActivationInfopublic final ActivationInfo getActivationInfo()
Container
Container.updateActivationInfoProperties(ActivationInfo)
method.getActivationInfo
in interface Container
public final void updateVariableProviderVariables() throws java.lang.IllegalStateException, java.lang.Exception
Container
updateVariableProviderVariables
in interface Container
java.lang.IllegalStateException
- - if called during activation or deactivation. This method can only be called when the Component is in the running state.java.lang.Exception
- - the update failed.public final void addSupportedDomainType(java.lang.String type)
type
- the name of the Component Typepublic final void removeSupportedDomainType(int idx)
idx
- the index of the Component Type to removepublic final boolean supportsType(java.lang.String typeName)
Container
supportsType
in interface Container
typeName
- the name of a Component typepublic java.lang.String getDistributionVersion()
Container
getDistributionVersion
in interface Container
public void setDistributionVersion(java.lang.String distributionVersion)
distributionVersion
- the distribution versionpublic java.lang.String getVersion()
Container
getVersion
in interface Container
public void setVersion(java.lang.String version)
version
- the versionpublic boolean getMultipleArchiveInstancesAllowed()
Container
getMultipleArchiveInstancesAllowed
in interface Container
public void setMultipleArchiveInstancesAllowed(boolean multipleArchiveInstancesAllowed)
multipleArchiveInstancesAllowed
- true if this enabler supports multiple archive instances, false otherwisepublic void addListener(Container.Listener l)
Container
addListener
in interface Container
l
- the listener to add to this Enablerpublic void removeListener(Container.Listener l)
Container
removeListener
in interface Container
l
- the listener to remove from this Enablerpublic int getListenerCount()
public ContainerSnapshotSupport getContainerSnapshotSupport()
public java.lang.String toString()
public GridlibInfo[] getDynamicGridlibDependencies()
Gets any dynamic Grid Library dependencies required by the Enabler using context variable DYNAMIC_GRIDLIB_DEPENDENCIES
.
This context variable contains a comma-delimited list of Grid Library names, for example:
DYNAMIC_GRIDLIB_DEPENDENCIES=myapp_extensions-3.4.2,jre-1.7
Otherwise an instance of empty array is returned.
getDynamicGridlibDependencies
in interface Container
public void drainingStarted()
Container
Domain.drainingStarted()
.drainingStarted
in interface Container
public void drainingStopped()
Container
Domain.drainingStopped()
.drainingStopped
in interface Container
public void componentNotification(java.lang.String componentName, java.util.List<NotificationEngineInfo> notificationEngineInfo)
Container
componentNotification
in interface Container
componentName
- - the Component namenotificationEngineInfo
- - the current Engine information list for the Component that has changed. An empty list means there are no Components running.public void addScriptProvidedStatistic(StatisticsMetadata scriptStat)
GridLibExtension
addScriptProvidedStatistic
in interface GridLibExtension
addScriptProvidedStatistic
in class AbstractGridLibExtension
scriptStat
- the statistic to addpublic boolean isComponentInstanceNumberingEnabled()
Container
isComponentInstanceNumberingEnabled
in interface Container
public void setComponentInstanceNumberingEnabled(boolean componentInstanceNumberingEnabled)
public void setShutdownReason(AbstractContainer.DEACTIVATION_CODES shutdownReason)
public java.lang.Enum<AbstractContainer.DEACTIVATION_CODES> getShutdownReason()
Container
getShutdownReason
in interface Container
public java.io.File resolveArchive(java.lang.String deploymentArchiveName, java.lang.String url, java.util.Properties properties, java.lang.String componentName, java.io.File destDir) throws java.lang.Exception
An archive is resolved when it is materialized on the Engine from the locator.
deploymentArchiveName
- the name of the archive to assume after being resolved, such as "JSPWiki.war"url
- the URL resource string for the archive, such as "http://s3.amazonaws.com/bucket/key","jdbc:mysql://localhost:3306/bookstore"properties
- the set of key-values to be used in archive resolution. This is specific to the locator.componentName
- the name of the active Component to deploy the archive todestDir
- the destination directory to place the resolved archive; usually a temporary directoryjava.lang.Exception
- if resolving failed in any waypublic static void copyDirNio(java.io.File from, java.io.File to) throws java.io.IOException
java.io.IOException
public static void copyDirNio(java.io.File from, java.io.File to, java.io.FileFilter f) throws java.io.IOException
java.io.IOException
Copyright © 2014 TIBCO Software, Inc. All Rights Reserved.