javax.enterprise.deploy.spi

Interface DeploymentManager

public interface DeploymentManager

The DeploymentManager object provides the core set of functions a J2EE platform must provide for J2EE application deployment. It provides server related information, such as, a list of deployment targets, and vendor unique runtime configuration information.
Method Summary
DeploymentConfigurationcreateConfiguration(DeployableObject dObj)
Retrieve the object that provides server-specific deployment configuration information for the J2EE deployable component.
ProgressObjectdistribute(Target[] targetList, File moduleArchive, File deploymentPlan)
The distribute method performs three tasks; it validates the deployment configuration data, generates all container specific classes and interfaces, and moves the fully baked archive to the designated deployment targets.
ProgressObjectdistribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan)
The distribute method performs three tasks; it validates the deployment configuration data, generates all container specific classes and interfaces, and moves the fully baked archive to the designated deployment targets.
TargetModuleID[]getAvailableModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of all J2EE application modules running or not running on the identified targets.
LocalegetCurrentLocale()
Returns the active locale this implementation of javax.enterprise.deploy.spi subpackages is running.
DConfigBeanVersionTypegetDConfigBeanVersion()
Returns the J2EE platform version number for which the configuration beans are provided.
LocalegetDefaultLocale()
Returns the default locale supported by this implementation of javax.enterprise.deploy.spi subpackages.
TargetModuleID[]getNonRunningModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of J2EE application modules distributed to the identified targets and that are currently not running on the associated server or servers.
TargetModuleID[]getRunningModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of J2EE application modules distributed to the identified targets and that are currently running on the associated server or servers.
Locale[]getSupportedLocales()
Returns an array of supported locales for this implementation.
Target[]getTargets()
Retrieve the list of deployment targets supported by this DeploymentManager.
booleanisDConfigBeanVersionSupported(DConfigBeanVersionType version)
Returns true if the configuration beans support the J2EE platform version specified.
booleanisLocaleSupported(Locale locale)
Reports if this implementation supports the designated locale.
booleanisRedeploySupported()
This method designates whether this platform vendor provides application redeployment functionality.
ProgressObjectredeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan)
(optional) The redeploy method provides a means for updating currently deployed J2EE applications.
ProgressObjectredeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan)
(optional) The redeploy method provides a means for updating currently deployed J2EE applications.
voidrelease()
The release method is the mechanism by which the tool signals to the DeploymentManager that the tool does not need it to continue running connected to the platform.
voidsetDConfigBeanVersion(DConfigBeanVersionType version)
Set the configuration beans to be used to the J2EE platform version specified.
voidsetLocale(Locale locale)
Set the active locale for this implementation of javax.enterprise.deploy.spi subpackages to run.
ProgressObjectstart(TargetModuleID[] moduleIDList)
Start the application running.
ProgressObjectstop(TargetModuleID[] moduleIDList)
Stop the application running.
ProgressObjectundeploy(TargetModuleID[] moduleIDList)
Remove the application from the target server.

Method Detail

createConfiguration

public DeploymentConfiguration createConfiguration(DeployableObject dObj)
Retrieve the object that provides server-specific deployment configuration information for the J2EE deployable component.

Parameters: dObj An object representing a J2EE deployable component.

Returns: An object used to configure server-specific deployment information

Throws: InvalidModuleException The DeployableObject is an unknown or unsupported component for this configuration tool.

distribute

public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan)
The distribute method performs three tasks; it validates the deployment configuration data, generates all container specific classes and interfaces, and moves the fully baked archive to the designated deployment targets.

Parameters: targetList A list of server targets the user is specifying this application should be deployed to. moduleArchive The file name of the application archive to be distributed. deploymentPlan The file containing the runtime configuration information associated with this application archive.

Returns: an object that tracks and reports the status of the distribution process.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.

distribute

public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan)
The distribute method performs three tasks; it validates the deployment configuration data, generates all container specific classes and interfaces, and moves the fully baked archive to the designated deployment targets.

Parameters: targetList A list of server targets the user is specifying this application should be deployed to. moduleArchive The stream containing the application archive to be distributed. deploymentPlan The stream containing the runtime configuration information associated with this application archive.

Returns: an object that tracks and reports the status of the distribution process.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.

getAvailableModules

public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of all J2EE application modules running or not running on the identified targets.

Parameters: moduleType A predefined designator for a J2EE module type. targetList A list of deployment Target designators the user wants checked for module not running status.

Returns: An array of TargetModuleID objects representing all deployed modules running or not or null if there are no deployed modules.

Throws: TargetException occurs when an invalid Target was provided. IllegalStateException is thrown when the method is called when running in disconnected mode.

getCurrentLocale

public Locale getCurrentLocale()
Returns the active locale this implementation of javax.enterprise.deploy.spi subpackages is running.

Returns: the active locale of this implementation.

getDConfigBeanVersion

public DConfigBeanVersionType getDConfigBeanVersion()
Returns the J2EE platform version number for which the configuration beans are provided. The beans must have been compiled with the J2SE version required by the J2EE platform.

Returns: a DConfigBeanVersionType object representing the platform version number for which these beans are provided.

getDefaultLocale

public Locale getDefaultLocale()
Returns the default locale supported by this implementation of javax.enterprise.deploy.spi subpackages.

Returns: the default locale for this implementation.

getNonRunningModules

public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of J2EE application modules distributed to the identified targets and that are currently not running on the associated server or servers.

Parameters: moduleType A predefined designator for a J2EE module type. targetList A list of deployment Target designators the user wants checked for module not running status.

Returns: An array of TargetModuleID objects representing the non-running modules or null if there are none.

Throws: TargetException occurs when an invalid Target was provided. IllegalStateException is thrown when the method is called when running in disconnected mode.

getRunningModules

public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList)
Retrieve the list of J2EE application modules distributed to the identified targets and that are currently running on the associated server or servers.

Parameters: moduleType A predefined designator for a J2EE module type. targetList A list of deployment Target designators the user wants checked for module run status.

Returns: An array of TargetModuleID objects representing the running modules or null if there are none.

Throws: TargetException occurs when an invalid Target was provided. IllegalStateException is thrown when the method is called when running in disconnected mode.

getSupportedLocales

public Locale[] getSupportedLocales()
Returns an array of supported locales for this implementation.

Returns: the list of supported locales.

getTargets

public Target[] getTargets()
Retrieve the list of deployment targets supported by this DeploymentManager.

Returns: A list of deployment Target designators the user may select for application deployment or null if there are none.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.

isDConfigBeanVersionSupported

public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version)
Returns true if the configuration beans support the J2EE platform version specified. It returns false if the version is not supported.

Parameters: version a DConfigBeanVersionType object representing the J2EE platform version for which support is requested.

Returns: true if the version is supported and 'false if not.

isLocaleSupported

public boolean isLocaleSupported(Locale locale)
Reports if this implementation supports the designated locale.

Parameters: locale the locale to check

Returns: A value of true means it is supported and false it is not.

isRedeploySupported

public boolean isRedeploySupported()
This method designates whether this platform vendor provides application redeployment functionality. A value of true means it is supported. False means it is not.

Returns: A value of true means redeployment is supported by this vendor's DeploymentManager. False means it is not.

redeploy

public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan)
(optional) The redeploy method provides a means for updating currently deployed J2EE applications. This is an optional method for vendor implementation. Redeploy replaces a currently deployed application with an updated version. The runtime configuration information for the updated application must remain identical to the application it is updating. When an application update is redeployed, all existing client connections to the original running application must not be disrupted; new clients will connect to the application update. This operation is valid for TargetModuleIDs that represent a root module. A root TargetModuleID has no parent. A root TargetModuleID module and all its child modules will be redeployed. A child TargetModuleID module cannot be individually redeployed. The redeploy operation is complete only when this action for all the modules has completed.

Parameters: moduleIDList An array of designators of the applications to be updated. moduleArchive The file name of the application archive to be redeployed. deploymentPlan The deployment configuration information associated with this application archive.

Returns: An object that tracks and reports the status of the redeploy operation.

Throws: UnsupportedOperationException this optional command is not supported by this implementation. IllegalStateException is thrown when the method is called when running in disconnected mode.

redeploy

public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan)
(optional) The redeploy method provides a means for updating currently deployed J2EE applications. This is an optional method for vendor implementation. Redeploy replaces a currently deployed application with an updated version. The runtime configuration information for the updated application must remain identical to the application it is updating. When an application update is redeployed, all existing client connections to the original running application must not be disrupted; new clients will connect to the application update. This operation is valid for TargetModuleIDs that represent a root module. A root TargetModuleID has no parent. A root TargetModuleID module and all its child modules will be redeployed. A child TargetModuleID module cannot be individually redeployed. The redeploy operation is complete only when this action for all the modules has completed.

Parameters: moduleIDList An array of designators of the applications to be updated. moduleArchive The stream containing the application archive to be redeployed. deploymentPlan The streeam containing the deployment configuration information associated with this application archive.

Returns: An object that tracks and reports the status of the redeploy operation.

Throws: UnsupportedOperationException this optional command is not supported by this implementation. IllegalStateException is thrown when the method is called when running in disconnected mode.

release

public void release()
The release method is the mechanism by which the tool signals to the DeploymentManager that the tool does not need it to continue running connected to the platform. The tool may be signaling it wants to run in a disconnected mode or it is planning to shutdown. When release is called the DeploymentManager may close any J2EE resource connections it had for deployment configuration and perform other related resource cleanup. It should not accept any new operation requests (i.e., distribute, start, stop, undeploy, redeploy. It should finish any operations that are currently in process. Each ProgressObject associated with a running operation should be marked as released (see the ProgressObject).

setDConfigBeanVersion

public void setDConfigBeanVersion(DConfigBeanVersionType version)
Set the configuration beans to be used to the J2EE platform version specified.

Parameters: version a DConfigBeanVersionType object representing the J2EE platform version for which support is requested.

Throws: DConfigBeanVersionUnsupportedException when the requested bean version is not supported.

setLocale

public void setLocale(Locale locale)
Set the active locale for this implementation of javax.enterprise.deploy.spi subpackages to run.

Parameters: locale the locale to set

Throws: UnsupportedOperationException the provide locale is not supported.

start

public ProgressObject start(TargetModuleID[] moduleIDList)
Start the application running.

Only the TargetModuleIDs which represent a root module are valid for being started. A root TargetModuleID has no parent. A TargetModuleID with a parent can not be individually started. A root TargetModuleID module and all its child modules will be started.

Parameters: moduleIDList An array of TargetModuleID objects representing the modules to be started.

Returns: An object that tracks and reports the status of the start operation.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.

stop

public ProgressObject stop(TargetModuleID[] moduleIDList)
Stop the application running.

Only the TargetModuleIDs which represent a root module are valid for being stopped. A root TargetModuleID has no parent. A TargetModuleID with a parent can not be individually stopped. A root TargetModuleID module and all its child modules will be stopped.

Parameters: moduleIDList An array of TargetModuleID objects representing the modules to be stopped.

Returns: An object that tracks and reports the status of the stop operation.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.

undeploy

public ProgressObject undeploy(TargetModuleID[] moduleIDList)
Remove the application from the target server.

Only the TargetModuleIDs which represent a root module are valid for undeployment. A root TargetModuleID has no parent. A TargetModuleID with a parent can not be undeployed. A root TargetModuleID module and all its child modules will be undeployed. The root TargetModuleID module and all its child modules must stopped before they can be undeployed.

Parameters: moduleIDList An array of TargetModuleID objects representing the root modules to be undeployed.

Returns: An object that tracks and reports the status of the stop operation.

Throws: IllegalStateException is thrown when the method is called when running in disconnected mode.