public class

DynamicModule

extends Object
implements MuleContextAware
java.lang.Object
   ↳ org.mule.devkit.DynamicModule
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This module allows the dynamic creation, configuration and invocation of mule modules developed using the Mule DevKit.

Summary

Fields
private static Logger logger
private MetaModel metaModel
private MuleContext muleContext Mule Context
private MetaModel muleMetaModel Mule Meta Module
Public Constructors
DynamicModule()
Public Methods
void create(String namespace, String name)
Create and configure a new module without attributes
void create(String namespace, String instanceName, Map<String, Object> attributes)
Create and configure a new module

void dispose()
Dispose the module
void initialise()
Initialise the module
void invoke(String moduleName, String operationName, Map<String, Object> arguments)
Invokes the operation specified with operationName in the module specified with moduleName and with attributes as its arguments.
void setMuleContext(MuleContext context)
Set the Mule context
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware

Fields

private static Logger logger

private MetaModel metaModel

private MuleContext muleContext

Mule Context

private MetaModel muleMetaModel

Mule Meta Module

Public Constructors

public DynamicModule ()

Public Methods

public void create (String namespace, String name)

Create and configure a new module without attributes

Parameters
namespace The namespace of the module to dynamically configure
name The name of the module
Throws
InstantiationException if the module cannot be created

public void create (String namespace, String instanceName, Map<String, Object> attributes)

Create and configure a new module

Parameters
namespace The namespace of the module to dynamically configure
instanceName The name of the module
attributes Configuration attributes
Throws
InstantiationException if the module cannot be created

public void dispose ()

Dispose the module

Throws
Exception If it cannot be initialised

public void initialise ()

Initialise the module

Throws
Exception If it cannot be initialised

public void invoke (String moduleName, String operationName, Map<String, Object> arguments)

Invokes the operation specified with operationName in the module specified with moduleName and with attributes as its arguments.

Parameters
moduleName The name of the module instance
operationName The name of the operation to invoke
arguments A map representing the arguments to the invocation.
Throws
If the operation does not exists, a module with the specified name cannot be found in the registry.
Exception

public void setMuleContext (MuleContext context)

Set the Mule context

Parameters
context Mule context to set