public class

DynamicFlowsModule

extends Object
implements MuleContextAware MuleContextNotificationListener<T extends MuleContextNotification> ApplicationContextAware
java.lang.Object
   ↳ org.mule.module.dynamicFlows.DynamicFlowsModule
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Adds, removes and runs dynamic Flows

Summary

Fields
private ApplicationContext applicationContext
private Map<String, MuleContext> contexts
private MuleContext mainContext
Public Constructors
DynamicFlowsModule()
Public Methods
void add(String contextName, List<String> configs)
Adds a dynamic context to the main application.
void onNotification(MuleContextNotification notification)
void remove(String contextName)
Removes a context from the main application
MuleMessage run(String contextName, String flowName, MuleMessage message)
Runs the flow added dynamically using a VM transport (request-response)
void setApplicationContext(ApplicationContext applicationContext)
Sets the parent application context.@see{org.springframework.context.ApplicationContextAware}
void setMuleContext(MuleContext context)
MuleMessage vmRun(String contextName, String flowName, MuleMessage message)
Runs the flow added dynamically using a vm inbound
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.context.notification.ServerNotificationListener
From interface org.springframework.context.ApplicationContextAware

Fields

private ApplicationContext applicationContext

private Map<String, MuleContext> contexts

private MuleContext mainContext

Public Constructors

public DynamicFlowsModule ()

Public Methods

public void add (String contextName, List<String> configs)

Adds a dynamic context to the main application.

Parameters
contextName The context identifier
configs The configuration files of the context that is going to be added.

public void onNotification (MuleContextNotification notification)

Parameters
notification

public void remove (String contextName)

Removes a context from the main application

Parameters
contextName The context identifier

public MuleMessage run (String contextName, String flowName, MuleMessage message)

Runs the flow added dynamically using a VM transport (request-response)

Parameters
contextName The context identifier
flowName The flow identifier
message The flow's payload
Returns
  • The mule Message
Throws
MuleException

public void setApplicationContext (ApplicationContext applicationContext)

Sets the parent application context.@see{org.springframework.context.ApplicationContextAware}

Parameters
applicationContext
Throws
BeansException

public void setMuleContext (MuleContext context)

Parameters
context

public MuleMessage vmRun (String contextName, String flowName, MuleMessage message)

Runs the flow added dynamically using a vm inbound

Parameters
contextName The context identifier
flowName The flow identifier with the VM inbound
message The flow's payload
Returns
  • The mule Message
Throws
MuleException