Interface Deployment
-
@Contract public interface DeploymentDeployment facility- Author:
- Jerome Dochez
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDeployment.DeploymentContextBuilder
-
Field Summary
Fields Modifier and Type Field Description static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>AFTER_APPLICATION_CLASSLOADER_CREATIONThis synchronous event is sent after creation of application classloader.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>AFTER_DEPLOYMENT_CLASSLOADER_CREATIONThis synchronous event is sent after creation of deployment classloader.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>ALL_APPLICATIONS_PROCESSEDThe following asynchronous event is sent after all applications are started in server start up.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>APPLICATION_CLEANEDstatic org.glassfish.api.event.EventTypes<ApplicationInfo>APPLICATION_DISABLEDstatic org.glassfish.api.event.EventTypes<ApplicationInfo>APPLICATION_LOADEDstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>APPLICATION_PREPAREDThe following synchronous events are sent after each change in an application stated (An application contains 1 to many modules)static org.glassfish.api.event.EventTypes<ApplicationInfo>APPLICATION_STARTEDstatic org.glassfish.api.event.EventTypes<ApplicationInfo>APPLICATION_STOPPEDstatic org.glassfish.api.event.EventTypes<ApplicationInfo>APPLICATION_UNLOADEDstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>DEPLOYMENT_BEFORE_CLASSLOADER_CREATIONThis synchronous event is sent before prepare phase of deployment.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>DEPLOYMENT_FAILUREThis asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.static StringDEPLOYMENT_FAILURE_NAMEThe name of the Deployment Failure eventstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>DEPLOYMENT_STARTThis synchronous event is sent when a new deployment or loading of an already deployed application start.static org.glassfish.api.event.EventTypes<ApplicationInfo>DEPLOYMENT_SUCCESSThis asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>INITIAL_CONTEXT_CREATEDThis synchronous event is sent right after initial deployment context is createdstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>MODULE_CLEANEDstatic org.glassfish.api.event.EventTypes<ModuleInfo>MODULE_LOADEDstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>MODULE_PREPAREDThe following synchronous events are sent after each change in a module state.static org.glassfish.api.event.EventTypes<ModuleInfo>MODULE_STARTEDstatic org.glassfish.api.event.EventTypes<ModuleInfo>MODULE_STOPPEDstatic org.glassfish.api.event.EventTypes<ModuleInfo>MODULE_UNLOADEDstatic org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>UNDEPLOYMENT_FAILUREThis asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.static org.glassfish.api.event.EventTypes<ApplicationInfo>UNDEPLOYMENT_STARTThis asynchronous event is sent when a new deployment or loading of an already deployed application start.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>UNDEPLOYMENT_SUCCESSThis asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.static org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext>UNDEPLOYMENT_VALIDATIONThe following synchronous event is sent before the application is undeployed so various listeners could validate the undeploy operation and decide whether to abort undeployment
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationInfodeploy(Collection<? extends org.glassfish.api.container.Sniffer> sniffers, ExtendedDeploymentContext context)ApplicationInfodeploy(ExtendedDeploymentContext context)org.glassfish.api.deployment.DeploymentContextdisable(org.glassfish.api.deployment.UndeployCommandParameters commandParams, com.sun.enterprise.config.serverbeans.Application app, ApplicationInfo appInfo, org.glassfish.api.ActionReport report, Logger logger)org.glassfish.api.deployment.DeploymentContextenable(String target, com.sun.enterprise.config.serverbeans.Application app, com.sun.enterprise.config.serverbeans.ApplicationRef appRef, org.glassfish.api.ActionReport report, Logger logger)ApplicationInfoget(String appName)org.glassfish.api.deployment.archive.ArchiveHandlergetArchiveHandler(org.glassfish.api.deployment.archive.ReadableArchive archive)org.glassfish.api.deployment.archive.ArchiveHandlergetArchiveHandler(org.glassfish.api.deployment.archive.ReadableArchive archive, String type)Deployment.DeploymentContextBuildergetBuilder(Logger loggger, org.glassfish.api.deployment.OpsParams params, org.glassfish.api.ActionReport report)StringgetDefaultTarget(Boolean isClassicStyle)StringgetDefaultTarget(String appName, org.glassfish.api.deployment.OpsParams.Origin origin, Boolean isClassicStyle)org.glassfish.hk2.classmodel.reflect.TypesgetDeployableTypes(org.glassfish.api.deployment.DeploymentContext context)Scans the source of the deployment operation for all types and store the result in the deployment context.Collection<? extends org.glassfish.api.container.Sniffer>getSniffers(org.glassfish.api.deployment.archive.ArchiveHandler archiveHandler, Collection<? extends org.glassfish.api.container.Sniffer> sniffers, org.glassfish.api.deployment.DeploymentContext context)List<org.glassfish.api.container.Sniffer>getSniffersFromApp(com.sun.enterprise.config.serverbeans.Application app)booleanisAppEnabled(com.sun.enterprise.config.serverbeans.Application app)booleanisRegistered(String appName)org.jvnet.hk2.config.TransactionprepareAppConfigChanges(org.glassfish.api.deployment.DeploymentContext context)org.glassfish.api.admin.ParameterMapprepareInstanceDeployParamMap(org.glassfish.api.deployment.DeploymentContext dc)ModuleInfoprepareModule(List<EngineInfo> sortedEngineInfos, String moduleName, org.glassfish.api.deployment.DeploymentContext context, ProgressTracker tracker)voidregisterAppInDomainXML(ApplicationInfo applicationInfo, org.glassfish.api.deployment.DeploymentContext context, org.jvnet.hk2.config.Transaction t)voidregisterAppInDomainXML(ApplicationInfo applicationInfo, org.glassfish.api.deployment.DeploymentContext context, org.jvnet.hk2.config.Transaction t, boolean appRefOnly)voidregisterTenantWithAppInDomainXML(String appName, ExtendedDeploymentContext context)List<EngineInfo>setupContainerInfos(org.glassfish.api.deployment.archive.ArchiveHandler handler, Collection<? extends org.glassfish.api.container.Sniffer> sniffers, org.glassfish.api.deployment.DeploymentContext context)List<EngineInfo>setupContainerInfos(org.glassfish.api.deployment.DeploymentContext context)voidundeploy(String appName, ExtendedDeploymentContext context)ApplicationInfounload(ApplicationInfo appInfo, ExtendedDeploymentContext context)voidunregisterAppFromDomainXML(String appName, String target)voidunregisterAppFromDomainXML(String appName, String target, boolean appRefOnly)voidunregisterTenantWithAppInDomainXML(String appName, String tenantName)voidupdateAppEnabledAttributeInDomainXML(String appName, String target, boolean enabled)voidvalidateDeploymentTarget(String target, String name, boolean isRedeploy)voidvalidateSpecifiedTarget(String target)voidvalidateUndeploymentTarget(String target, String name)
-
-
-
Field Detail
-
INITIAL_CONTEXT_CREATED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> INITIAL_CONTEXT_CREATED
This synchronous event is sent right after initial deployment context is created
-
DEPLOYMENT_START
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> DEPLOYMENT_START
This synchronous event is sent when a new deployment or loading of an already deployed application start. It is invoked once before any sniffer is invoked.
-
DEPLOYMENT_FAILURE_NAME
static final String DEPLOYMENT_FAILURE_NAME
The name of the Deployment Failure event- See Also:
- Constant Field Values
-
DEPLOYMENT_FAILURE
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> DEPLOYMENT_FAILURE
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.
-
AFTER_DEPLOYMENT_CLASSLOADER_CREATION
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> AFTER_DEPLOYMENT_CLASSLOADER_CREATION
This synchronous event is sent after creation of deployment classloader.
-
DEPLOYMENT_BEFORE_CLASSLOADER_CREATION
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> DEPLOYMENT_BEFORE_CLASSLOADER_CREATION
This synchronous event is sent before prepare phase of deployment.
-
AFTER_APPLICATION_CLASSLOADER_CREATION
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> AFTER_APPLICATION_CLASSLOADER_CREATION
This synchronous event is sent after creation of application classloader.
-
DEPLOYMENT_SUCCESS
static final org.glassfish.api.event.EventTypes<ApplicationInfo> DEPLOYMENT_SUCCESS
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.
-
UNDEPLOYMENT_START
static final org.glassfish.api.event.EventTypes<ApplicationInfo> UNDEPLOYMENT_START
This asynchronous event is sent when a new deployment or loading of an already deployed application start. It is invoked once before any sniffer is invoked.
-
UNDEPLOYMENT_FAILURE
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> UNDEPLOYMENT_FAILURE
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.
-
UNDEPLOYMENT_SUCCESS
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> UNDEPLOYMENT_SUCCESS
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.
-
MODULE_PREPARED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> MODULE_PREPARED
The following synchronous events are sent after each change in a module state.
-
MODULE_LOADED
static final org.glassfish.api.event.EventTypes<ModuleInfo> MODULE_LOADED
-
MODULE_STARTED
static final org.glassfish.api.event.EventTypes<ModuleInfo> MODULE_STARTED
-
MODULE_STOPPED
static final org.glassfish.api.event.EventTypes<ModuleInfo> MODULE_STOPPED
-
MODULE_UNLOADED
static final org.glassfish.api.event.EventTypes<ModuleInfo> MODULE_UNLOADED
-
MODULE_CLEANED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> MODULE_CLEANED
-
APPLICATION_PREPARED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> APPLICATION_PREPARED
The following synchronous events are sent after each change in an application stated (An application contains 1 to many modules)
-
APPLICATION_LOADED
static final org.glassfish.api.event.EventTypes<ApplicationInfo> APPLICATION_LOADED
-
APPLICATION_STARTED
static final org.glassfish.api.event.EventTypes<ApplicationInfo> APPLICATION_STARTED
-
APPLICATION_STOPPED
static final org.glassfish.api.event.EventTypes<ApplicationInfo> APPLICATION_STOPPED
-
APPLICATION_UNLOADED
static final org.glassfish.api.event.EventTypes<ApplicationInfo> APPLICATION_UNLOADED
-
APPLICATION_CLEANED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> APPLICATION_CLEANED
-
APPLICATION_DISABLED
static final org.glassfish.api.event.EventTypes<ApplicationInfo> APPLICATION_DISABLED
-
UNDEPLOYMENT_VALIDATION
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> UNDEPLOYMENT_VALIDATION
The following synchronous event is sent before the application is undeployed so various listeners could validate the undeploy operation and decide whether to abort undeployment
-
ALL_APPLICATIONS_PROCESSED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> ALL_APPLICATIONS_PROCESSED
The following asynchronous event is sent after all applications are started in server start up.
-
-
Method Detail
-
getBuilder
Deployment.DeploymentContextBuilder getBuilder(Logger loggger, org.glassfish.api.deployment.OpsParams params, org.glassfish.api.ActionReport report)
-
getArchiveHandler
org.glassfish.api.deployment.archive.ArchiveHandler getArchiveHandler(org.glassfish.api.deployment.archive.ReadableArchive archive) throws IOException- Throws:
IOException
-
getArchiveHandler
org.glassfish.api.deployment.archive.ArchiveHandler getArchiveHandler(org.glassfish.api.deployment.archive.ReadableArchive archive, String type) throws IOException- Throws:
IOException
-
prepareModule
ModuleInfo prepareModule(List<EngineInfo> sortedEngineInfos, String moduleName, org.glassfish.api.deployment.DeploymentContext context, ProgressTracker tracker) throws Exception
- Throws:
Exception
-
deploy
ApplicationInfo deploy(ExtendedDeploymentContext context)
-
deploy
ApplicationInfo deploy(Collection<? extends org.glassfish.api.container.Sniffer> sniffers, ExtendedDeploymentContext context)
-
undeploy
void undeploy(String appName, ExtendedDeploymentContext context)
-
prepareAppConfigChanges
org.jvnet.hk2.config.Transaction prepareAppConfigChanges(org.glassfish.api.deployment.DeploymentContext context) throws org.jvnet.hk2.config.TransactionFailure- Throws:
org.jvnet.hk2.config.TransactionFailure
-
registerAppInDomainXML
void registerAppInDomainXML(ApplicationInfo applicationInfo, org.glassfish.api.deployment.DeploymentContext context, org.jvnet.hk2.config.Transaction t) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
unregisterAppFromDomainXML
void unregisterAppFromDomainXML(String appName, String target) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
registerAppInDomainXML
void registerAppInDomainXML(ApplicationInfo applicationInfo, org.glassfish.api.deployment.DeploymentContext context, org.jvnet.hk2.config.Transaction t, boolean appRefOnly) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
unregisterAppFromDomainXML
void unregisterAppFromDomainXML(String appName, String target, boolean appRefOnly) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
registerTenantWithAppInDomainXML
void registerTenantWithAppInDomainXML(String appName, ExtendedDeploymentContext context) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
unregisterTenantWithAppInDomainXML
void unregisterTenantWithAppInDomainXML(String appName, String tenantName) throws org.jvnet.hk2.config.TransactionFailure, org.jvnet.hk2.config.RetryableException
- Throws:
org.jvnet.hk2.config.TransactionFailureorg.jvnet.hk2.config.RetryableException
-
updateAppEnabledAttributeInDomainXML
void updateAppEnabledAttributeInDomainXML(String appName, String target, boolean enabled) throws org.jvnet.hk2.config.TransactionFailure
- Throws:
org.jvnet.hk2.config.TransactionFailure
-
setupContainerInfos
List<EngineInfo> setupContainerInfos(org.glassfish.api.deployment.DeploymentContext context) throws Exception
- Throws:
Exception
-
setupContainerInfos
List<EngineInfo> setupContainerInfos(org.glassfish.api.deployment.archive.ArchiveHandler handler, Collection<? extends org.glassfish.api.container.Sniffer> sniffers, org.glassfish.api.deployment.DeploymentContext context) throws Exception
- Throws:
Exception
-
isRegistered
boolean isRegistered(String appName)
-
get
ApplicationInfo get(String appName)
-
prepareInstanceDeployParamMap
org.glassfish.api.admin.ParameterMap prepareInstanceDeployParamMap(org.glassfish.api.deployment.DeploymentContext dc) throws Exception- Throws:
Exception
-
validateDeploymentTarget
void validateDeploymentTarget(String target, String name, boolean isRedeploy)
-
validateSpecifiedTarget
void validateSpecifiedTarget(String target)
-
isAppEnabled
boolean isAppEnabled(com.sun.enterprise.config.serverbeans.Application app)
-
unload
ApplicationInfo unload(ApplicationInfo appInfo, ExtendedDeploymentContext context)
-
disable
org.glassfish.api.deployment.DeploymentContext disable(org.glassfish.api.deployment.UndeployCommandParameters commandParams, com.sun.enterprise.config.serverbeans.Application app, ApplicationInfo appInfo, org.glassfish.api.ActionReport report, Logger logger) throws Exception- Throws:
Exception
-
enable
org.glassfish.api.deployment.DeploymentContext enable(String target, com.sun.enterprise.config.serverbeans.Application app, com.sun.enterprise.config.serverbeans.ApplicationRef appRef, org.glassfish.api.ActionReport report, Logger logger) throws Exception
- Throws:
Exception
-
getDeployableTypes
org.glassfish.hk2.classmodel.reflect.Types getDeployableTypes(org.glassfish.api.deployment.DeploymentContext context) throws IOExceptionScans the source of the deployment operation for all types and store the result in the deployment context. Subsequent calls will return the cached copy from the context- Parameters:
context- deployment context- Returns:
- the types information from the deployment artifacts
- Throws:
IOException- if the scanning fails due to an I/O exception
-
getSniffersFromApp
List<org.glassfish.api.container.Sniffer> getSniffersFromApp(com.sun.enterprise.config.serverbeans.Application app)
-
getSniffers
Collection<? extends org.glassfish.api.container.Sniffer> getSniffers(org.glassfish.api.deployment.archive.ArchiveHandler archiveHandler, Collection<? extends org.glassfish.api.container.Sniffer> sniffers, org.glassfish.api.deployment.DeploymentContext context)
-
getDefaultTarget
String getDefaultTarget(String appName, org.glassfish.api.deployment.OpsParams.Origin origin, Boolean isClassicStyle)
-
-