org.jboss.deployment.spi
Class DeploymentManagerImpl

java.lang.Object
  extended byorg.jboss.deployment.spi.DeploymentManagerImpl
All Implemented Interfaces:
DeploymentManager (src)

public class DeploymentManagerImpl
extends java.lang.Object
implements DeploymentManager (src)

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.


Field Summary
static java.lang.String DEPLOYER_SCHEME
          The URI scheme this deployment factory recoginzes: jboss-local-deployer
 
Constructor Summary
DeploymentManagerImpl(java.net.URI deployURI, boolean isConnected)
          Create a deployment manager for the given URL and connected mode.
DeploymentManagerImpl(java.net.URI deployURI, boolean isConnected, java.lang.String username, java.lang.String password)
          Create a deployment manager for the given URL and connected mode, username and password.
 
Method Summary
 DeploymentConfiguration (src) createConfiguration(DeployableObject (src)  obj)
          Retrieve server specific configuration for a component
 ProgressObject (src) distribute(Target (src) [] targets, java.io.File moduleArchive, java.io.File deploymentPlan)
          Validates the configuration, generates all container specific classes and moves the archive to the targets
 ProgressObject (src) distribute(Target (src) [] targets, java.io.InputStream moduleArchive, java.io.InputStream deploymentPlan)
          Validates the configuration, generates all container specific classes and moves the archive to the targets
 TargetModuleID (src) [] getAvailableModules(ModuleType (src)  moduleType, Target (src) [] targets)
          Retrieve the list of all J2EE application modules running or not running on the identified targets.
 java.util.Locale getCurrentLocale()
          Currently we only support the default locale
 DConfigBeanVersionType (src) getDConfigBeanVersion()
          Get the J2EE platform version
 java.util.Locale getDefaultLocale()
          Get the default locale
 TargetModuleID (src) [] getNonRunningModules(ModuleType (src)  moduleType, Target (src) [] targets)
          Get the non running modules
 TargetModuleID (src) [] getRunningModules(ModuleType (src)  moduleType, Target (src) [] targets)
          Get the running modules
 java.util.Locale[] getSupportedLocales()
          Currently we only support the default locale
 Target (src) [] getTargets()
          Get the available targets.
 boolean isDConfigBeanVersionSupported(DConfigBeanVersionType (src)  dConfigBeanVersionType)
          Test whether the version is supported
 boolean isDConfigBeanVersionTypeSupported(DConfigBeanVersionType (src)  version)
          Test whether the version is supported
 boolean isLocaleSupported(java.util.Locale locale)
          Currently we only support the default locale
 boolean isRedeploySupported()
          Is redeploy supported
 ProgressObject (src) redeploy(TargetModuleID (src) [] moduleIDList)
          Redeploys the modules
 ProgressObject (src) redeploy(TargetModuleID (src) [] targetModuleIDs, java.io.File file, java.io.File file1)
          Redeploys the modules
 ProgressObject (src) redeploy(TargetModuleID (src) [] targetModuleIDs, java.io.InputStream inputStream, java.io.InputStream inputStream1)
          Redeploys the modules
 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.
 void setDConfigBeanVersion(DConfigBeanVersionType (src)  dConfigBeanVersionType)
          Set the J2EE version
 void setDConfigBeanVersionType(DConfigBeanVersionType (src)  version)
          Set the J2EE version
 void setLocale(java.util.Locale locale)
          Currently we only support the default locale
 ProgressObject (src) start(TargetModuleID (src) [] targetModuleIDs)
          Start the modules
 ProgressObject (src) stop(TargetModuleID (src) [] targetModuleIDs)
          Stop the modules
 ProgressObject (src) undeploy(TargetModuleID (src) [] targetModuleIDs)
          Removes the modules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEPLOYER_SCHEME

public static final java.lang.String DEPLOYER_SCHEME
The URI scheme this deployment factory recoginzes: jboss-local-deployer

See Also:
Constant Field Values (src)
Constructor Detail

DeploymentManagerImpl

public DeploymentManagerImpl(java.net.URI deployURI,
                             boolean isConnected)
Create a deployment manager for the given URL and connected mode.

Parameters:
deployURI -
isConnected -

DeploymentManagerImpl

public DeploymentManagerImpl(java.net.URI deployURI,
                             boolean isConnected,
                             java.lang.String username,
                             java.lang.String password)
Create a deployment manager for the given URL and connected mode, username and password.

Parameters:
deployURI -
isConnected -
username -
password -
Method Detail

getTargets

public Target (src) [] getTargets()
Get the available targets. This is determined by parsing the deployURI. Currently there is only one target, either a JMXTarget that uses the RMIAdaptor based on the URI info, or a LocalhostTarget if the URI opaque.

Specified by:
getTargets in interface DeploymentManager (src)
Returns:
the available targets
Throws:
java.lang.IllegalStateException - when the manager is disconnected

getRunningModules

public TargetModuleID (src) [] getRunningModules(ModuleType (src)  moduleType,
                                          Target (src) [] targets)
                                   throws TargetException (src) 
Get the running modules

Specified by:
getRunningModules in interface DeploymentManager (src)
Parameters:
moduleType - the module type
targets - the targets
Returns:
the target modules
Throws:
TargetException (src) - an invalid target
java.lang.IllegalStateException - when the manager is disconnected

getNonRunningModules

public TargetModuleID (src) [] getNonRunningModules(ModuleType (src)  moduleType,
                                             Target (src) [] targets)
                                      throws TargetException (src) 
Get the non running modules

Specified by:
getNonRunningModules in interface DeploymentManager (src)
Parameters:
moduleType - the module type
targets - the targets
Returns:
the target modules
Throws:
TargetException (src) - an invalid target
java.lang.IllegalStateException - when the manager is disconnected

getAvailableModules

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

Specified by:
getAvailableModules in interface DeploymentManager (src)
Parameters:
moduleType - the module type
targets - the targets
Returns:
the target modules
Throws:
TargetException (src) - an invalid target
java.lang.IllegalStateException - when the manager is disconnected

createConfiguration

public DeploymentConfiguration (src)  createConfiguration(DeployableObject (src)  obj)
                                            throws InvalidModuleException (src) 
Retrieve server specific configuration for a component

Specified by:
createConfiguration in interface DeploymentManager (src)
Parameters:
obj - the deployable component
Returns:
the configuration
Throws:
InvalidModuleException (src) - when the module does not exist or is not supported

distribute

public ProgressObject (src)  distribute(Target (src) [] targets,
                                 java.io.File moduleArchive,
                                 java.io.File deploymentPlan)
Validates the configuration, generates all container specific classes and moves the archive to the targets

Specified by:
distribute in interface DeploymentManager (src)
Parameters:
targets - the targets
moduleArchive - the module archive
deploymentPlan - the runtime configuration
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected

distribute

public ProgressObject (src)  distribute(Target (src) [] targets,
                                 java.io.InputStream moduleArchive,
                                 java.io.InputStream deploymentPlan)
Validates the configuration, generates all container specific classes and moves the archive to the targets

Specified by:
distribute in interface DeploymentManager (src)
Parameters:
targets - the targets
moduleArchive - the module archive
deploymentPlan - the runtime configuration
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected

redeploy

public ProgressObject (src)  redeploy(TargetModuleID (src) [] targetModuleIDs,
                               java.io.File file,
                               java.io.File file1)
                        throws java.lang.UnsupportedOperationException,
                               java.lang.IllegalStateException
Description copied from interface: DeploymentManager (src)
Redeploys the modules

Specified by:
redeploy in interface DeploymentManager (src)
Parameters:
targetModuleIDs - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected
java.lang.UnsupportedOperationException - when redeploy is not supported

redeploy

public ProgressObject (src)  redeploy(TargetModuleID (src) [] targetModuleIDs,
                               java.io.InputStream inputStream,
                               java.io.InputStream inputStream1)
                        throws java.lang.UnsupportedOperationException,
                               java.lang.IllegalStateException
Description copied from interface: DeploymentManager (src)
Redeploys the modules

Specified by:
redeploy in interface DeploymentManager (src)
Parameters:
targetModuleIDs - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected
java.lang.UnsupportedOperationException - when redeploy is not supported

start

public ProgressObject (src)  start(TargetModuleID (src) [] targetModuleIDs)
Start the modules

Specified by:
start in interface DeploymentManager (src)
Parameters:
targetModuleIDs - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected

stop

public ProgressObject (src)  stop(TargetModuleID (src) [] targetModuleIDs)
Stop the modules

Specified by:
stop in interface DeploymentManager (src)
Parameters:
targetModuleIDs - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected

undeploy

public ProgressObject (src)  undeploy(TargetModuleID (src) [] targetModuleIDs)
Removes the modules

Specified by:
undeploy in interface DeploymentManager (src)
Parameters:
targetModuleIDs - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected

isRedeploySupported

public boolean isRedeploySupported()
Is redeploy supported

Specified by:
isRedeploySupported in interface DeploymentManager (src)
Returns:
true when redeploy is supported, false otherwise

redeploy

public ProgressObject (src)  redeploy(TargetModuleID (src) [] moduleIDList)
Redeploys the modules

Parameters:
moduleIDList - the list of modules
Returns:
the progress object
Throws:
java.lang.IllegalStateException - when the manager is disconnected
java.lang.UnsupportedOperationException - when redeploy is not supported

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).

Specified by:
release in interface DeploymentManager (src)

getDefaultLocale

public java.util.Locale getDefaultLocale()
Get the default locale

Specified by:
getDefaultLocale in interface DeploymentManager (src)
Returns:
the default locale

getCurrentLocale

public java.util.Locale getCurrentLocale()
Currently we only support the default locale

Specified by:
getCurrentLocale in interface DeploymentManager (src)
Returns:
the current locale

setLocale

public void setLocale(java.util.Locale locale)
Currently we only support the default locale

Specified by:
setLocale in interface DeploymentManager (src)
Parameters:
locale - the new local

isLocaleSupported

public boolean isLocaleSupported(java.util.Locale locale)
Currently we only support the default locale

Specified by:
isLocaleSupported in interface DeploymentManager (src)
Parameters:
locale - the locale
Returns:
true when supported, false otherwise

getSupportedLocales

public java.util.Locale[] getSupportedLocales()
Currently we only support the default locale

Specified by:
getSupportedLocales in interface DeploymentManager (src)
Returns:
the supported locales

getDConfigBeanVersion

public DConfigBeanVersionType (src)  getDConfigBeanVersion()
Get the J2EE platform version

Specified by:
getDConfigBeanVersion in interface DeploymentManager (src)
Returns:
the version

setDConfigBeanVersion

public void setDConfigBeanVersion(DConfigBeanVersionType (src)  dConfigBeanVersionType)
                           throws DConfigBeanVersionUnsupportedException (src) 
Description copied from interface: DeploymentManager (src)
Set the J2EE version

Specified by:
setDConfigBeanVersion in interface DeploymentManager (src)
Parameters:
dConfigBeanVersionType - the version
Throws:
DConfigBeanVersionUnsupportedException (src)

isDConfigBeanVersionSupported

public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType (src)  dConfigBeanVersionType)
Description copied from interface: DeploymentManager (src)
Test whether the version is supported

Specified by:
isDConfigBeanVersionSupported in interface DeploymentManager (src)
Parameters:
dConfigBeanVersionType - the version
Returns:
true when supported, false otherwise

isDConfigBeanVersionTypeSupported

public boolean isDConfigBeanVersionTypeSupported(DConfigBeanVersionType (src)  version)
Test whether the version is supported

Parameters:
version - the version
Returns:
true when supported, false otherwise

setDConfigBeanVersionType

public void setDConfigBeanVersionType(DConfigBeanVersionType (src)  version)
Set the J2EE version

Parameters:
version - the version
Throws:
java.lang.UnsupportedOperationException - when the version is not supported