org.glassfish.internal.deployment
Interface Deployment


@Contract
public interface Deployment

Deployment facility

Author:
Jerome Dochez

Nested Class Summary
static interface Deployment.DeploymentContextBuilder
           
 
Field Summary
static EventTypes<DeploymentContext> ALL_APPLICATIONS_PROCESSED
          The following asynchronous event is sent after all applications are started in server start up.
static EventTypes<DeploymentContext> APPLICATION_CLEANED
           
static EventTypes<ApplicationInfo> APPLICATION_DISABLED
           
static EventTypes<ApplicationInfo> APPLICATION_LOADED
           
static EventTypes<DeploymentContext> APPLICATION_PREPARED
          The following synchronous events are sent after each change in an application stated (An application contains 1 to many modules)
static EventTypes<ApplicationInfo> APPLICATION_STARTED
           
static EventTypes<ApplicationInfo> APPLICATION_STOPPED
           
static EventTypes<ApplicationInfo> APPLICATION_UNLOADED
           
static EventTypes<DeploymentContext> DEPLOYMENT_BEFORE_CLASSLOADER_CREATION
          This asynchronous event is sent before prepare phase of deployment.
static EventTypes<DeploymentContext> DEPLOYMENT_FAILURE
          This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.
static EventTypes<DeploymentContext> DEPLOYMENT_START
          This asynchronous event is sent when a new deployment or loading of an already deployed application start.
static EventTypes<ApplicationInfo> DEPLOYMENT_SUCCESS
          This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.
static EventTypes<DeploymentContext> MODULE_CLEANED
           
static EventTypes<ModuleInfo> MODULE_LOADED
           
static EventTypes<DeploymentContext> MODULE_PREPARED
          The following synchronous events are sent after each change in a module state.
static EventTypes<ModuleInfo> MODULE_STARTED
           
static EventTypes<ModuleInfo> MODULE_STOPPED
           
static EventTypes<ModuleInfo> MODULE_UNLOADED
           
static EventTypes<DeploymentContext> UNDEPLOYMENT_FAILURE
          This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.
static EventTypes<ApplicationInfo> UNDEPLOYMENT_START
          This asynchronous event is sent when a new deployment or loading of an already deployed application start.
static EventTypes<DeploymentContext> UNDEPLOYMENT_SUCCESS
          This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) succeeded.
static EventTypes<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
 
Method Summary
 ApplicationInfo deploy(Collection<Sniffer> sniffers, ExtendedDeploymentContext context)
           
 ApplicationInfo deploy(ExtendedDeploymentContext context)
           
 void disable(UndeployCommandParameters commandParams, Application app, ApplicationInfo appInfo, ActionReport report, Logger logger)
           
 void enable(String target, Application app, ApplicationRef appRef, ActionReport report, Logger logger)
           
 ApplicationInfo get(String appName)
           
 ArchiveHandler getArchiveHandler(ReadableArchive archive)
           
 ArchiveHandler getArchiveHandler(ReadableArchive archive, String type)
           
 Deployment.DeploymentContextBuilder getBuilder(Logger loggger, OpsParams params, ActionReport report)
           
 org.glassfish.hk2.classmodel.reflect.Types getDeployableTypes(DeploymentContext context)
          Scans the source of the deployment operation for all types and store the result in the deployment context.
 List<Sniffer> getSniffersFromApp(Application app)
           
 boolean isAppEnabled(Application app)
           
 boolean isRegistered(String appName)
           
 org.jvnet.hk2.config.Transaction prepareAppConfigChanges(DeploymentContext context)
           
 ParameterMap prepareInstanceDeployParamMap(DeploymentContext dc)
           
 ModuleInfo prepareModule(List<EngineInfo> sortedEngineInfos, String moduleName, DeploymentContext context, ProgressTracker tracker)
           
 List<Sniffer> prepareSniffersForOSGiDeployment(String type, DeploymentContext context)
           
 void registerAppInDomainXML(ApplicationInfo applicationInfo, DeploymentContext context, org.jvnet.hk2.config.Transaction t)
           
 void registerAppInDomainXML(ApplicationInfo applicationInfo, DeploymentContext context, org.jvnet.hk2.config.Transaction t, boolean appRefOnly)
           
 List<EngineInfo> setupContainerInfos(ArchiveHandler handler, Collection<? extends Sniffer> sniffers, DeploymentContext context)
           
 List<EngineInfo> setupContainerInfos(DeploymentContext context)
           
 void undeploy(String appName, ExtendedDeploymentContext context)
           
 ApplicationInfo unload(ApplicationInfo appInfo, ExtendedDeploymentContext context)
           
 void unregisterAppFromDomainXML(String appName, String target)
           
 void unregisterAppFromDomainXML(String appName, String target, boolean appRefOnly)
           
 void updateAppEnabledAttributeInDomainXML(String appName, String target, boolean enabled)
           
 void validateDeploymentTarget(String target, String name, boolean isRedeploy)
           
 void validateUndeploymentTarget(String target, String name)
           
 

Field Detail

DEPLOYMENT_START

static final EventTypes<DeploymentContext> DEPLOYMENT_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.


DEPLOYMENT_FAILURE

static final EventTypes<DeploymentContext> DEPLOYMENT_FAILURE
This asynchronous event is sent when a deployment activity (first time deploy or loading of an already deployed application) failed.


DEPLOYMENT_BEFORE_CLASSLOADER_CREATION

static final EventTypes<DeploymentContext> DEPLOYMENT_BEFORE_CLASSLOADER_CREATION
This asynchronous event is sent before prepare phase of deployment.


DEPLOYMENT_SUCCESS

static final 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 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 EventTypes<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 EventTypes<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 EventTypes<DeploymentContext> MODULE_PREPARED
The following synchronous events are sent after each change in a module state.


MODULE_LOADED

static final EventTypes<ModuleInfo> MODULE_LOADED

MODULE_STARTED

static final EventTypes<ModuleInfo> MODULE_STARTED

MODULE_STOPPED

static final EventTypes<ModuleInfo> MODULE_STOPPED

MODULE_UNLOADED

static final EventTypes<ModuleInfo> MODULE_UNLOADED

MODULE_CLEANED

static final EventTypes<DeploymentContext> MODULE_CLEANED

APPLICATION_PREPARED

static final EventTypes<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 EventTypes<ApplicationInfo> APPLICATION_LOADED

APPLICATION_STARTED

static final EventTypes<ApplicationInfo> APPLICATION_STARTED

APPLICATION_STOPPED

static final EventTypes<ApplicationInfo> APPLICATION_STOPPED

APPLICATION_UNLOADED

static final EventTypes<ApplicationInfo> APPLICATION_UNLOADED

APPLICATION_CLEANED

static final EventTypes<DeploymentContext> APPLICATION_CLEANED

APPLICATION_DISABLED

static final EventTypes<ApplicationInfo> APPLICATION_DISABLED

UNDEPLOYMENT_VALIDATION

static final EventTypes<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 EventTypes<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,
                                               OpsParams params,
                                               ActionReport report)

getArchiveHandler

ArchiveHandler getArchiveHandler(ReadableArchive archive)
                                 throws IOException
Throws:
IOException

getArchiveHandler

ArchiveHandler getArchiveHandler(ReadableArchive archive,
                                 String type)
                                 throws IOException
Throws:
IOException

prepareModule

ModuleInfo prepareModule(List<EngineInfo> sortedEngineInfos,
                         String moduleName,
                         DeploymentContext context,
                         ProgressTracker tracker)
                         throws Exception
Throws:
Exception

deploy

ApplicationInfo deploy(ExtendedDeploymentContext context)

deploy

ApplicationInfo deploy(Collection<Sniffer> sniffers,
                       ExtendedDeploymentContext context)

undeploy

void undeploy(String appName,
              ExtendedDeploymentContext context)

prepareAppConfigChanges

org.jvnet.hk2.config.Transaction prepareAppConfigChanges(DeploymentContext context)
                                                         throws org.jvnet.hk2.config.TransactionFailure
Throws:
org.jvnet.hk2.config.TransactionFailure

registerAppInDomainXML

void registerAppInDomainXML(ApplicationInfo applicationInfo,
                            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,
                            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

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(DeploymentContext context)
                                     throws Exception
Throws:
Exception

setupContainerInfos

List<EngineInfo> setupContainerInfos(ArchiveHandler handler,
                                     Collection<? extends Sniffer> sniffers,
                                     DeploymentContext context)
                                     throws Exception
Throws:
Exception

isRegistered

boolean isRegistered(String appName)

get

ApplicationInfo get(String appName)

prepareSniffersForOSGiDeployment

List<Sniffer> prepareSniffersForOSGiDeployment(String type,
                                               DeploymentContext context)

prepareInstanceDeployParamMap

ParameterMap prepareInstanceDeployParamMap(DeploymentContext dc)
                                           throws Exception
Throws:
Exception

validateDeploymentTarget

void validateDeploymentTarget(String target,
                              String name,
                              boolean isRedeploy)

validateUndeploymentTarget

void validateUndeploymentTarget(String target,
                                String name)

isAppEnabled

boolean isAppEnabled(Application app)

unload

ApplicationInfo unload(ApplicationInfo appInfo,
                       ExtendedDeploymentContext context)

disable

void disable(UndeployCommandParameters commandParams,
             Application app,
             ApplicationInfo appInfo,
             ActionReport report,
             Logger logger)
             throws Exception
Throws:
Exception

enable

void enable(String target,
            Application app,
            ApplicationRef appRef,
            ActionReport report,
            Logger logger)
            throws Exception
Throws:
Exception

getDeployableTypes

org.glassfish.hk2.classmodel.reflect.Types getDeployableTypes(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<Sniffer> getSniffersFromApp(Application app)


Copyright © 2012 GlassFish Community. All Rights Reserved.