Interface Deployment


  • @Contract
    public interface Deployment
    Deployment facility
    Author:
    Jerome Dochez
    • 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

      • 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
      • 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.TransactionFailure
        org.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.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)
      • 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)
      • validateUndeploymentTarget

        void validateUndeploymentTarget​(String target,
                                        String name)
      • validateSpecifiedTarget

        void validateSpecifiedTarget​(String target)
      • isAppEnabled

        boolean isAppEnabled​(com.sun.enterprise.config.serverbeans.Application app)
      • 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

        String getDefaultTarget​(String appName,
                                org.glassfish.api.deployment.OpsParams.Origin origin,
                                Boolean isClassicStyle)
      • getDefaultTarget

        String getDefaultTarget​(Boolean isClassicStyle)