org.mule.module.launcher.application
Class DefaultMuleApplication

java.lang.Object
  extended by org.mule.module.launcher.application.DefaultMuleApplication
All Implemented Interfaces:
Application
Direct Known Subclasses:
PriviledgedMuleApplication

public class DefaultMuleApplication
extends Object
implements Application


Nested Class Summary
protected  class DefaultMuleApplication.ConfigFileWatcher
           
protected  class DefaultMuleApplication.FileWatcherNotificationListener
           
 
Field Summary
protected  String[] absoluteResourcePaths
           
protected static String ANCHOR_FILE_BLURB
           
protected static int DEFAULT_RELOAD_CHECK_INTERVAL_MS
           
protected  Log deployLogger
           
protected  ClassLoader deploymentClassLoader
           
protected  DeploymentListener deploymentListener
           
protected  ApplicationDescriptor descriptor
           
protected  Log logger
           
protected  MuleContext muleContext
           
protected  ScheduledExecutorService watchTimer
           
 
Constructor Summary
protected DefaultMuleApplication(ApplicationDescriptor appDesc)
           
 
Method Summary
protected  void addAnnotationsConfigBuilderIfPresent(List<ConfigurationBuilder> builders)
           
protected  void addIBeansConfigurationBuilderIfPackagesConfiguredForScanning(List<ConfigurationBuilder> builders)
           
protected  ConfigurationBuilder createConfigurationBuilder()
           
protected  ConfigurationBuilder createConfigurationBuilderFromApplicationProperties()
           
protected  void createDeploymentClassLoader()
           
protected  void createRedeployMonitor()
           
protected  String determineConfigBuilderClassName()
           
 void dispose()
           
protected  void doDispose()
           
 String getAppName()
           
 ClassLoader getDeploymentClassLoader()
           
 ApplicationDescriptor getDescriptor()
           
 MuleContext getMuleContext()
           
 void init()
           
 void install()
           
 void redeploy()
           
protected  void scheduleConfigMonitor(AbstractFileWatcher watcher)
           
 void setAppName(String appName)
           
 void setDeploymentListener(DeploymentListener deploymentListener)
           
 void start()
           
 void stop()
           
protected  File toAbsoluteFile(String path)
          Resolve a resource relative to an application root.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_RELOAD_CHECK_INTERVAL_MS

protected static final int DEFAULT_RELOAD_CHECK_INTERVAL_MS
See Also:
Constant Field Values

ANCHOR_FILE_BLURB

protected static final String ANCHOR_FILE_BLURB
See Also:
Constant Field Values

logger

protected final transient Log logger

deployLogger

protected final transient Log deployLogger

watchTimer

protected ScheduledExecutorService watchTimer

muleContext

protected MuleContext muleContext

deploymentClassLoader

protected ClassLoader deploymentClassLoader

descriptor

protected ApplicationDescriptor descriptor

absoluteResourcePaths

protected String[] absoluteResourcePaths

deploymentListener

protected DeploymentListener deploymentListener
Constructor Detail

DefaultMuleApplication

protected DefaultMuleApplication(ApplicationDescriptor appDesc)
Method Detail

setDeploymentListener

public void setDeploymentListener(DeploymentListener deploymentListener)

install

public void install()
Specified by:
install in interface Application

getAppName

public String getAppName()
Specified by:
getAppName in interface Application

getDescriptor

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

setAppName

public void setAppName(String appName)

start

public void start()
Specified by:
start in interface Application

init

public void init()
Specified by:
init in interface Application

createConfigurationBuilder

protected ConfigurationBuilder createConfigurationBuilder()
                                                   throws Exception
Throws:
Exception

determineConfigBuilderClassName

protected String determineConfigBuilderClassName()

createConfigurationBuilderFromApplicationProperties

protected ConfigurationBuilder createConfigurationBuilderFromApplicationProperties()

addAnnotationsConfigBuilderIfPresent

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

addIBeansConfigurationBuilderIfPackagesConfiguredForScanning

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

getMuleContext

public MuleContext getMuleContext()
Specified by:
getMuleContext in interface Application

getDeploymentClassLoader

public ClassLoader getDeploymentClassLoader()
Specified by:
getDeploymentClassLoader in interface Application
Returns:
a classloader associated with this deployment

dispose

public void dispose()
Specified by:
dispose in interface Application

redeploy

public void redeploy()
Specified by:
redeploy in interface Application

stop

public void stop()
Specified by:
stop in interface Application

toString

public String toString()
Overrides:
toString in class Object

doDispose

protected void doDispose()

createDeploymentClassLoader

protected void createDeploymentClassLoader()

createRedeployMonitor

protected void createRedeployMonitor()
                              throws NotificationException
Throws:
NotificationException

scheduleConfigMonitor

protected void scheduleConfigMonitor(AbstractFileWatcher watcher)

toAbsoluteFile

protected File toAbsoluteFile(String path)
Resolve a resource relative to an application root.

Parameters:
path - the relative path to resolve
Returns:
absolute path, may not actually exist (check with File.exists())


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