org.mule.module.launcher.application
Class DefaultMuleApplication

java.lang.Object
  extended by org.mule.module.launcher.application.DefaultMuleApplication
All Implemented Interfaces:
Application, Artifact

public class DefaultMuleApplication
extends Object
implements Application


Field Summary
protected  ApplicationClassLoaderFactory applicationClassLoaderFactory
           
protected  Log deployLogger
           
protected  ArtifactClassLoader deploymentClassLoader
           
protected  DeploymentListener deploymentListener
           
protected  ApplicationDescriptor descriptor
           
protected  Log logger
           
protected  MuleContext muleContext
           
 
Constructor Summary
DefaultMuleApplication(ApplicationDescriptor descriptor, ApplicationClassLoaderFactory applicationClassLoaderFactory, Domain domain)
           
 
Method Summary
protected  void addAnnotationsConfigBuilderIfPresent(List<ConfigurationBuilder> builders)
           
protected  ConfigurationBuilder createConfigurationBuilderFromApplicationProperties()
           
 void dispose()
          Dispose the artifact.
protected  void doDispose()
           
 ArtifactClassLoader getArtifactClassLoader()
           
 String getArtifactName()
           
 ApplicationDescriptor getDescriptor()
           
 MuleContext getMuleContext()
           
 File[] getResourceFiles()
           
 ApplicationStatus getStatus()
           
 void init()
          Initialise the artifact resources
 void install()
          Install the artifact.
 void setAppName(String appName)
           
 void setDeploymentListener(DeploymentListener deploymentListener)
           
 void start()
          Starts the artifact execution
 void stop()
          Stops the artifact execution
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger

deployLogger

protected final transient Log deployLogger

descriptor

protected final ApplicationDescriptor descriptor

applicationClassLoaderFactory

protected final ApplicationClassLoaderFactory applicationClassLoaderFactory

muleContext

protected MuleContext muleContext

deploymentClassLoader

protected ArtifactClassLoader deploymentClassLoader

deploymentListener

protected DeploymentListener deploymentListener
Constructor Detail

DefaultMuleApplication

public DefaultMuleApplication(ApplicationDescriptor descriptor,
                              ApplicationClassLoaderFactory applicationClassLoaderFactory,
                              Domain domain)
Method Detail

setDeploymentListener

public void setDeploymentListener(DeploymentListener deploymentListener)

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

getDescriptor

public ApplicationDescriptor getDescriptor()
Specified by:
getDescriptor in interface Application

setAppName

public void setAppName(String appName)

start

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

Specified by:
start in interface Artifact

init

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

Specified by:
init in interface Artifact

createConfigurationBuilderFromApplicationProperties

protected ConfigurationBuilder createConfigurationBuilderFromApplicationProperties()

addAnnotationsConfigBuilderIfPresent

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

getMuleContext

public MuleContext getMuleContext()
Specified by:
getMuleContext in interface Application
Specified by:
getMuleContext in interface Artifact
Returns:
MuleContext created from the artifact configurations files.

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.

stop

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

Specified by:
stop in interface Artifact

getStatus

public ApplicationStatus getStatus()
Specified by:
getStatus in interface Application
Returns:
the current status of the application

toString

public String toString()
Overrides:
toString in class Object

doDispose

protected void doDispose()


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