Interface Deployment
@Contract
public interface Deployment
Deployment facility
- Author:
- Jerome Dochez
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This synchronous event is sent after creation of application classloader.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This synchronous event is sent after creation of deployment classloader.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> The following asynchronous event is sent after all applications are started in server start up.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> static final org.glassfish.api.event.EventTypes<ApplicationInfo> static final org.glassfish.api.event.EventTypes<ApplicationInfo> static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> The following synchronous events are sent after each change in an application stated (An application contains 1 to many modules)static final org.glassfish.api.event.EventTypes<ApplicationInfo> static final org.glassfish.api.event.EventTypes<ApplicationInfo> static final org.glassfish.api.event.EventTypes<ApplicationInfo> static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This synchronous event is sent before prepare phase of deployment.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.static final StringThe name of the Deployment Failure eventstatic final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This synchronous event is sent when a new deployment or loading of an already deployed application start.static final org.glassfish.api.event.EventTypes<ApplicationInfo> This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This synchronous event is sent right after initial deployment context is createdstatic final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> static final org.glassfish.api.event.EventTypes<ModuleInfo> static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> The following synchronous events are sent after each change in a module state.static final org.glassfish.api.event.EventTypes<ModuleInfo> static final org.glassfish.api.event.EventTypes<ModuleInfo> static final org.glassfish.api.event.EventTypes<ModuleInfo> static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.static final org.glassfish.api.event.EventTypes<ApplicationInfo> This asynchronous event is sent when a new deployment or loading of an already deployed application start.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> 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 -
Method Summary
Modifier and TypeMethodDescriptiondeploy(Collection<? extends org.glassfish.api.container.Sniffer> sniffers, ExtendedDeploymentContext context) deploy(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) 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) getBuilder(Logger loggger, org.glassfish.api.deployment.OpsParams params, org.glassfish.api.ActionReport report) getDefaultTarget(Boolean isClassicStyle) getDefaultTarget(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) prepareModule(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) unload(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 Details
-
INITIAL_CONTEXT_CREATED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> INITIAL_CONTEXT_CREATEDThis 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_STARTThis 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
The name of the Deployment Failure event- See Also:
-
DEPLOYMENT_FAILURE
static final 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. -
AFTER_DEPLOYMENT_CLASSLOADER_CREATION
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> AFTER_DEPLOYMENT_CLASSLOADER_CREATIONThis 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_CREATIONThis 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_CREATIONThis synchronous event is sent after creation of application classloader. -
DEPLOYMENT_SUCCESS
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded. -
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_FAILUREThis 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_SUCCESSThis 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_PREPAREDThe following synchronous events are sent after each change in a module state. -
MODULE_LOADED
-
MODULE_STARTED
-
MODULE_STOPPED
-
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_PREPAREDThe following synchronous events are sent after each change in an application stated (An application contains 1 to many modules) -
APPLICATION_LOADED
-
APPLICATION_STARTED
-
APPLICATION_STOPPED
-
APPLICATION_UNLOADED
-
APPLICATION_CLEANED
static final org.glassfish.api.event.EventTypes<org.glassfish.api.deployment.DeploymentContext> APPLICATION_CLEANED -
APPLICATION_DISABLED
-
UNDEPLOYMENT_VALIDATION
static final 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 -
ALL_APPLICATIONS_PROCESSED
static final 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.
-
-
Method Details
-
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
-
deploy
ApplicationInfo deploy(Collection<? extends org.glassfish.api.container.Sniffer> sniffers, ExtendedDeploymentContext context) -
undeploy
-
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
-
get
-
prepareInstanceDeployParamMap
org.glassfish.api.admin.ParameterMap prepareInstanceDeployParamMap(org.glassfish.api.deployment.DeploymentContext dc) throws Exception - Throws:
Exception
-
validateDeploymentTarget
-
validateUndeploymentTarget
-
validateSpecifiedTarget
-
isAppEnabled
boolean isAppEnabled(com.sun.enterprise.config.serverbeans.Application app) -
unload
-
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 IOException Scans 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
-
getDefaultTarget
-