org.apache.geronimo.deployment.service
Class ServiceConfigBuilder

java.lang.Object
  extended by org.apache.geronimo.deployment.service.ServiceConfigBuilder
All Implemented Interfaces:
ConfigurationBuilder, GBeanLifecycle

public class ServiceConfigBuilder
extends Object
implements ConfigurationBuilder, GBeanLifecycle


Field Summary
static GBeanInfo GBEAN_INFO
           
static String SERVICE_MODULE
           
 
Fields inherited from interface org.apache.geronimo.deployment.ConfigurationBuilder
CONFIG_BUILDER
 
Constructor Summary
ServiceConfigBuilder(Environment defaultEnvironment, Collection repositories, Collection serviceBuilders, Kernel kernel)
           
ServiceConfigBuilder(Environment defaultEnvironment, Collection repositories, Collection serviceBuilders, Naming naming)
           
ServiceConfigBuilder(Environment defaultEnvironment, Collection repositories, Naming naming)
           
 
Method Summary
 DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, ModuleType moduleType, JarFile jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore)
           
 DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore)
          Build a configuration from a local file
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 Artifact getConfigurationID(Object plan, JarFile module, ModuleIDBuilder idBuilder)
          Checks what configuration URL will be used for the provided module.
 Object getDeploymentPlan(File planFile, JarFile jarFile, ModuleIDBuilder idBuilder)
          Builds a deployment plan specific to this builder from a planFile and/or module if this builder can process it.
static GBeanInfo getGBeanInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_MODULE

public static final String SERVICE_MODULE
See Also:
Constant Field Values

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

ServiceConfigBuilder

public ServiceConfigBuilder(Environment defaultEnvironment,
                            Collection repositories,
                            Naming naming)

ServiceConfigBuilder

public ServiceConfigBuilder(Environment defaultEnvironment,
                            Collection repositories,
                            Collection serviceBuilders,
                            Kernel kernel)

ServiceConfigBuilder

public ServiceConfigBuilder(Environment defaultEnvironment,
                            Collection repositories,
                            Collection serviceBuilders,
                            Naming naming)
Method Detail

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getDeploymentPlan

public Object getDeploymentPlan(File planFile,
                                JarFile jarFile,
                                ModuleIDBuilder idBuilder)
                         throws DeploymentException
Description copied from interface: ConfigurationBuilder
Builds a deployment plan specific to this builder from a planFile and/or module if this builder can process it.

Specified by:
getDeploymentPlan in interface ConfigurationBuilder
Parameters:
planFile - the deployment plan to examine; can be null
jarFile - the URL of the module to examine; can be null
Returns:
the deployment plan, or null if this builder can not handle the module
Throws:
DeploymentException - if there was a problem with the configuration

getConfigurationID

public Artifact getConfigurationID(Object plan,
                                   JarFile module,
                                   ModuleIDBuilder idBuilder)
                            throws IOException,
                                   DeploymentException
Description copied from interface: ConfigurationBuilder
Checks what configuration URL will be used for the provided module.

Specified by:
getConfigurationID in interface ConfigurationBuilder
Parameters:
plan - the deployment plan
module - the module to build
Returns:
the ID that will be used for the Configuration
Throws:
IOException - if there was a problem reading or writing the files
DeploymentException - if there was a problem with the configuration

buildConfiguration

public DeploymentContext buildConfiguration(boolean inPlaceDeployment,
                                            Artifact configId,
                                            Object plan,
                                            JarFile jar,
                                            Collection configurationStores,
                                            ArtifactResolver artifactResolver,
                                            ConfigurationStore targetConfigurationStore)
                                     throws IOException,
                                            DeploymentException
Description copied from interface: ConfigurationBuilder
Build a configuration from a local file

Specified by:
buildConfiguration in interface ConfigurationBuilder
Parameters:
inPlaceDeployment - true if the deployment is in-place.
plan - the deployment plan
jar - the module to build
Returns:
the deployment context created from the deployment (the contexts must be closed by the caller)
Throws:
IOException - if there was a problem reading or writing the files
DeploymentException - if there was a problem with the configuration

buildConfiguration

public DeploymentContext buildConfiguration(boolean inPlaceDeployment,
                                            Artifact configId,
                                            ModuleType moduleType,
                                            JarFile jar,
                                            Collection configurationStores,
                                            ArtifactResolver artifactResolver,
                                            ConfigurationStore targetConfigurationStore)
                                     throws DeploymentException,
                                            IOException
Throws:
DeploymentException
IOException

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.