org.mule.module.launcher
Class MuleDeploymentService

java.lang.Object
  extended by org.mule.module.launcher.MuleDeploymentService
All Implemented Interfaces:
DeploymentListenerManager, DeploymentService

public class MuleDeploymentService
extends Object
implements DeploymentService


Nested Class Summary
protected  class MuleDeploymentService.AppDirWatcher
          Not thread safe.
 
Field Summary
static String ANOTHER_DEPLOYMENT_OPERATION_IS_IN_PROGRESS
           
static String APP_ANCHOR_SUFFIX
           
protected  ScheduledExecutorService appDirMonitorTimer
           
protected  ApplicationFactory appFactory
           
protected static int DEFAULT_CHANGES_CHECK_INTERVAL_MS
           
protected  MuleDeployer deployer
           
static String INSTALL_OPERATION_HAS_BEEN_INTERRUPTED
           
protected  Log logger
           
static org.apache.commons.io.filefilter.IOFileFilter ZIP_APPS_FILTER
           
static String ZIP_FILE_SUFFIX
           
 
Constructor Summary
MuleDeploymentService(PluginClassLoaderManager pluginClassLoaderManager)
           
 
Method Summary
 void addDeploymentListener(DeploymentListener listener)
           
 void addStartupListener(StartupListener listener)
           
protected  void addZombie(File marker)
           
 void deploy(URL appArchiveUrl)
           
 Application findApplication(String appName)
          Finds an active application by name.
 ApplicationFactory getAppFactory()
           
 List<Application> getApplications()
          Lists all deployed applications.
protected  MuleDeployer getDeployer()
           
 ReentrantLock getLock()
          Obtains the object used to synchronize the service.
 Map<URL,Long> getZombieMap()
           
protected  void onApplicationInstalled(Application a)
           
 void removeDeploymentListener(DeploymentListener listener)
           
 void removeStartupListener(StartupListener listener)
           
protected  void scheduleChangeMonitor(File appsDir)
           
 void setAppFactory(ApplicationFactory appFactory)
           
 void setDeployer(MuleDeployer deployer)
           
 void start()
           
 void stop()
           
protected  void undeploy(Application app)
           
 void undeploy(String appName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_ANCHOR_SUFFIX

public static final String APP_ANCHOR_SUFFIX
See Also:
Constant Field Values

ZIP_FILE_SUFFIX

public static final String ZIP_FILE_SUFFIX
See Also:
Constant Field Values

ZIP_APPS_FILTER

public static final org.apache.commons.io.filefilter.IOFileFilter ZIP_APPS_FILTER

ANOTHER_DEPLOYMENT_OPERATION_IS_IN_PROGRESS

public static final String ANOTHER_DEPLOYMENT_OPERATION_IS_IN_PROGRESS
See Also:
Constant Field Values

INSTALL_OPERATION_HAS_BEEN_INTERRUPTED

public static final String INSTALL_OPERATION_HAS_BEEN_INTERRUPTED
See Also:
Constant Field Values

DEFAULT_CHANGES_CHECK_INTERVAL_MS

protected static final int DEFAULT_CHANGES_CHECK_INTERVAL_MS
See Also:
Constant Field Values

appDirMonitorTimer

protected ScheduledExecutorService appDirMonitorTimer

logger

protected final transient Log logger

deployer

protected MuleDeployer deployer

appFactory

protected ApplicationFactory appFactory
Constructor Detail

MuleDeploymentService

public MuleDeploymentService(PluginClassLoaderManager pluginClassLoaderManager)
Method Detail

start

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

scheduleChangeMonitor

protected void scheduleChangeMonitor(File appsDir)

stop

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

findApplication

public Application findApplication(String appName)
Description copied from interface: DeploymentService
Finds an active application by name.

Specified by:
findApplication in interface DeploymentService
Returns:
null if not found

getApplications

public List<Application> getApplications()
Description copied from interface: DeploymentService
Lists all deployed applications.

Specified by:
getApplications in interface DeploymentService
Returns:
immutable applications list

getZombieMap

public Map<URL,Long> getZombieMap()
Returns:
URL/lastModified of apps which previously failed to deploy

getDeployer

protected MuleDeployer getDeployer()

setAppFactory

public void setAppFactory(ApplicationFactory appFactory)

setDeployer

public void setDeployer(MuleDeployer deployer)

getAppFactory

public ApplicationFactory getAppFactory()

getLock

public ReentrantLock getLock()
Description copied from interface: DeploymentService
Obtains the object used to synchronize the service.

Specified by:
getLock in interface DeploymentService
Returns:
a non null lock object.

onApplicationInstalled

protected void onApplicationInstalled(Application a)

undeploy

protected void undeploy(Application app)

undeploy

public void undeploy(String appName)
Specified by:
undeploy in interface DeploymentService

deploy

public void deploy(URL appArchiveUrl)
            throws IOException
Specified by:
deploy in interface DeploymentService
Throws:
IOException

addZombie

protected void addZombie(File marker)

addStartupListener

public void addStartupListener(StartupListener listener)
Specified by:
addStartupListener in interface DeploymentService

removeStartupListener

public void removeStartupListener(StartupListener listener)
Specified by:
removeStartupListener in interface DeploymentService

addDeploymentListener

public void addDeploymentListener(DeploymentListener listener)
Specified by:
addDeploymentListener in interface DeploymentListenerManager

removeDeploymentListener

public void removeDeploymentListener(DeploymentListener listener)
Specified by:
removeDeploymentListener in interface DeploymentListenerManager


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