Interface ExtendedDeploymentContext
- All Superinterfaces:
org.glassfish.api.deployment.ApplicationContext,org.glassfish.api.deployment.DeploymentContext,org.glassfish.api.ExecutionContext
public interface ExtendedDeploymentContext
extends org.glassfish.api.deployment.DeploymentContext
Semi-private interface to the deployment context.
- Author:
- Jerome Dochez
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclean()voidcreateApplicationClassLoader(ClassLoaderHierarchy clh, org.glassfish.api.deployment.archive.ArchiveHandler handler) Create the final class loader.voidcreateDeploymentClassLoader(ClassLoaderHierarchy clh, org.glassfish.api.deployment.archive.ArchiveHandler handler) Create the deployment class loader.Returns the alternate deployment descriptor directory for the application (used for holding the external alternate deployment descriptors).Returns the internal directory for the application (used for holding the uploaded archive, for example).Gets the deployment context for modules.Gets the module uri for this module context.Gets the parent context for this context.getPhase()Returns the tenant, if one is valid for thisDeploymentContext.Returns the directory containing the expanded tenant customization archive, if this deployment context is for a tenant and if a customization archive was specified when the tenant was provisioned.voidpostDeployClean(boolean isFinalClean) Performs any clean-up of the deployment context after deployment has finished.voidPrepare the scratch directories, creating the directories if they do not exist.voidsetArchiveHandler(org.glassfish.api.deployment.archive.ArchiveHandler archiveHandler) Sets the archive handler that's associated with this context.voidsetClassLoader(ClassLoader classLoader) Sets the classloader.voidsetModulePropsMap(Map<String, Properties> modulePropsMap) Sets the module properties for modules.voidsetModuleUri(String moduleUri) Sets the module uri for this module context.voidsetParentContext(ExtendedDeploymentContext parentContext) Sets the parent context.voidsetPhase(ExtendedDeploymentContext.Phase newPhase) Sets the phase of the deployment activity.voidsetSource(org.glassfish.api.deployment.archive.ReadableArchive source) Sets the source archive.voidSets the tenant to which this deployment context applies.Methods inherited from interface org.glassfish.api.deployment.ApplicationContext
getAppProps, getClassLoader, getModulePropsMethods inherited from interface org.glassfish.api.deployment.DeploymentContext
addModuleMetaData, addTransformer, addTransientAppMetaData, getActionReport, getAppLibs, getArchiveHandler, getCommandParameters, getFinalClassLoader, getModuleArchiveHandlers, getModuleMetadata, getModuleMetaData, getModulePropsMap, getOriginalSource, getScratchDir, getSource, getSourceDir, getTransientAppMetadata, getTransientAppMetaDataMethods inherited from interface org.glassfish.api.ExecutionContext
getLogger
-
Field Details
-
IS_TEMP_CLASSLOADER
- See Also:
-
TRACKER
- See Also:
-
-
Method Details
-
setPhase
Sets the phase of the deployment activity.- Parameters:
newPhase- the phase of the deployment activity
-
getPhase
ExtendedDeploymentContext.Phase getPhase() -
createDeploymentClassLoader
void createDeploymentClassLoader(ClassLoaderHierarchy clh, org.glassfish.api.deployment.archive.ArchiveHandler handler) throws URISyntaxException, MalformedURLException Create the deployment class loader.It will be used for sniffer retrieval, metadata parsing and deployer prepare.
- Parameters:
clh- the hierarchy of class loader for the parenthandler- the archive handler for the source archive- Throws:
URISyntaxExceptionMalformedURLException
-
createApplicationClassLoader
void createApplicationClassLoader(ClassLoaderHierarchy clh, org.glassfish.api.deployment.archive.ArchiveHandler handler) throws URISyntaxException, MalformedURLException Create the final class loader.It will be used to load and start application.
- Parameters:
clh- the hierarchy of class loader for the parenthandler- the archive handler for the source archive- Throws:
URISyntaxExceptionMalformedURLException
-
clean
void clean() -
setArchiveHandler
void setArchiveHandler(org.glassfish.api.deployment.archive.ArchiveHandler archiveHandler) Sets the archive handler that's associated with this context.- Parameters:
archiveHandler- the archive handler associated with this context
-
setSource
void setSource(org.glassfish.api.deployment.archive.ReadableArchive source) Sets the source archive.- Parameters:
source- the source archive
-
setModulePropsMap
Sets the module properties for modules.- Parameters:
modulePropsMap- the module properties map
-
getModuleDeploymentContexts
Map<String,ExtendedDeploymentContext> getModuleDeploymentContexts()Gets the deployment context for modules.- Returns:
- a map containing module deployment contexts
-
setClassLoader
Sets the classloader.- Parameters:
classLoader- the classloader
-
setParentContext
Sets the parent context.- Parameters:
parentContext- the parent context
-
getModuleUri
String getModuleUri()Gets the module uri for this module context.- Returns:
- the module uri
-
setModuleUri
Sets the module uri for this module context.- Parameters:
moduleUri- the module uri
-
getParentContext
ExtendedDeploymentContext getParentContext()Gets the parent context for this context.- Returns:
- the parent context
-
getAppInternalDir
File getAppInternalDir()Returns the internal directory for the application (used for holding the uploaded archive, for example).- Returns:
- location of the internal directory for the application
-
getAppAltDDDir
File getAppAltDDDir()Returns the alternate deployment descriptor directory for the application (used for holding the external alternate deployment descriptors).- Returns:
- location of the alternate deployment descriptor directory for the application
-
getTenant
String getTenant()Returns the tenant, if one is valid for thisDeploymentContext.- Returns:
- tenant if applicable,
nullif no tenant is set for this deployment context
-
setTenant
Sets the tenant to which this deployment context applies.Also initializes the tenant directory.
- Parameters:
tenant- the name of the tenantappName- the name of the application
-
getTenantDir
File getTenantDir()Returns the directory containing the expanded tenant customization archive, if this deployment context is for a tenant and if a customization archive was specified when the tenant was provisioned.- Returns:
- directory containing the expanded customization archive,
nullif none
-
postDeployClean
void postDeployClean(boolean isFinalClean) Performs any clean-up of the deployment context after deployment has finished.This method can be invoked either with
true, meaning that this is the final clean-up for the deployment context, or withfalse, meaning that the deployment context implementation should be selective. (Some data is used, for instance,in theDeployCommandlogic afterApplicationLifeCycle.deploy()has completed).- Parameters:
isFinalClean- whether this clean is the final clean or a selective one
-
prepareScratchDirs
Prepare the scratch directories, creating the directories if they do not exist.- Throws:
IOException
-