org.mule.module.launcher.domain
Class DefaultMuleDomain

java.lang.Object
  extended by org.mule.module.launcher.domain.DefaultMuleDomain
All Implemented Interfaces:
Artifact, Domain

public class DefaultMuleDomain
extends Object
implements Domain


Field Summary
protected  Log deployLogger
           
protected  Log logger
           
 
Constructor Summary
DefaultMuleDomain(DomainClassLoaderRepository domainClassLoaderRepository, String name)
           
 
Method Summary
protected  void addAnnotationsConfigBuilderIfPresent(List<ConfigurationBuilder> builders)
           
 boolean containsSharedResources()
           
 ConfigurationBuilder createApplicationConfigurationBuilder(Application application)
          Creates a ConfigurationBuilder for a certain application which is going to be configured to use the correct domain.
protected  String determineConfigBuilderClassNameForApplication(Application defaultMuleApplication)
           
 void dispose()
          Dispose the artifact.
 ArtifactClassLoader getArtifactClassLoader()
           
 String getArtifactName()
           
 MuleContext getMuleContext()
           
 String getName()
           
 File[] getResourceFiles()
           
 void init()
          Initialise the artifact resources
 void initialise()
           
 void install()
          Install the artifact.
 void setDeploymentListener(DeploymentListener deploymentListener)
           
 void start()
          Starts the artifact execution
 void stop()
          Stops the artifact execution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger

deployLogger

protected final transient Log deployLogger
Constructor Detail

DefaultMuleDomain

public DefaultMuleDomain(DomainClassLoaderRepository domainClassLoaderRepository,
                         String name)
Method Detail

setDeploymentListener

public void setDeploymentListener(DeploymentListener deploymentListener)

getName

public String getName()

getMuleContext

public MuleContext getMuleContext()
Specified by:
getMuleContext in interface Artifact
Specified by:
getMuleContext in interface Domain
Returns:
the MuleContext created with the domain resources. It can return null if it doesn't contains shared resources

createApplicationConfigurationBuilder

public ConfigurationBuilder createApplicationConfigurationBuilder(Application application)
                                                           throws Exception
Description copied from interface: Domain
Creates a ConfigurationBuilder for a certain application which is going to be configured to use the correct domain.

Specified by:
createApplicationConfigurationBuilder in interface Domain
Parameters:
application - application for which the configuration builder should be created.
Returns:
configuration builder to getDomainClassLoader the application
Throws:
Exception

determineConfigBuilderClassNameForApplication

protected String determineConfigBuilderClassNameForApplication(Application defaultMuleApplication)

install

public void install()
Description copied from interface: Artifact
Install the artifact. Most commonly this includes the creation of the class loader and validation of resources.

Specified by:
install in interface Artifact

init

public void init()
Description copied from interface: Artifact
Initialise the artifact resources

Specified by:
init in interface Artifact

addAnnotationsConfigBuilderIfPresent

protected void addAnnotationsConfigBuilderIfPresent(List<ConfigurationBuilder> builders)
                                             throws Exception
Throws:
Exception

start

public void start()
Description copied from interface: Artifact
Starts the artifact execution

Specified by:
start in interface Artifact

stop

public void stop()
Description copied from interface: Artifact
Stops the artifact execution

Specified by:
stop in interface Artifact

dispose

public void dispose()
Description copied from interface: Artifact
Dispose the artifact. Most commonly this includes the release of the resources held by the artifact

Specified by:
dispose in interface Artifact

getArtifactName

public String getArtifactName()
Specified by:
getArtifactName in interface Artifact
Returns:
the artifact identifier

getResourceFiles

public File[] getResourceFiles()
Specified by:
getResourceFiles in interface Artifact
Returns:
an array with the configuration files of the artifact. Never returns null. If there's no configuration file then returns an empty array.

getArtifactClassLoader

public ArtifactClassLoader getArtifactClassLoader()
Specified by:
getArtifactClassLoader in interface Artifact
Returns:
class loader responsible for loading resources for this artifact.

initialise

public void initialise()

containsSharedResources

public boolean containsSharedResources()
Specified by:
containsSharedResources in interface Domain
Returns:
true if this domain has shared mule components, false if it doesn't


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.