Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.processor
Class InvokerMessageProcessor

    java.lang.Object
      org.mule.processor.InvokerMessageProcessor

All Implemented Interfaces:
  MuleContextAware, Initialisable, MessageProcessor

    public class InvokerMessageProcessor

extends Object
implements MessageProcessor, Initialisable, MuleContextAware

`InvokerMessageProcessor` invokes a specified method of an object. An array of argument expressions can be provided to map the message to the method arguments. The method used is determined by the method name along with the number of argument expressions provided. The results of the expression evaluations will automatically be transformed where possible to the method argument type. Multiple methods with the same name and same number of arguments are not supported currently.

Field Summary
`protected List<?>` | `arguments`
`protected Class<?>[]` | `argumentTypes`
`protected ExpressionManager` | `expressionManager`
`protected Log` | `logger`
`protected Method` | `method`
`protected String` | `methodName`
`protected MuleContext` | `muleContext`
`protected String` | `name`
`protected Object` | `object`
`protected Class<?>` | `objectType`
`protected TemplateParser.PatternInfo` | `patternInfo`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`InvokerMessageProcessor()`

Method Summary
`protected MuleEvent` | `createResultEvent(MuleEvent event, Object result)`
`protected Object[]` | `evaluateArguments(MuleEvent event, List<?> argumentTemplates)`
`protected Object` | `evaluateExpressionCandidate(Object expressionCandidate, MuleMessage message)`
`String` | `getName()`
`void` | `initialise()` Method used to perform any initialisation work.
`protected void` | `lookupObjectInstance()`
`MuleEvent` | `process(MuleEvent event)` Invokes the MessageProcessor.
`protected void` | `resolveMethodToInvoke()`
`void` | `setArgumentExpressionsString(String arguments)`
`void` | `setArguments(List<?> arguments)`
`void` | `setArgumentTypes(Class<?>[] argumentTypes)`
`void` | `setMethodName(String methodName)`
`void` | `setMuleContext(MuleContext context)`
`void` | `setName(String name)`
`void` | `setObject(Object object)`
`void` | `setObjectType(Class<?> objectType)`
`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

### object

    protected Object object

### objectType

    protected Class<?> objectType

### methodName

    protected String methodName

### arguments

    protected List<?> arguments

### argumentTypes

    protected Class<?>[] argumentTypes

### name

    protected String name

### patternInfo

    protected TemplateParser.PatternInfo patternInfo

### method

    protected Method method

### expressionManager

    protected ExpressionManager expressionManager

### muleContext

    protected MuleContext muleContext

Constructor Detail

### InvokerMessageProcessor

    public InvokerMessageProcessor()

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

  Specified by:
    `initialise` in interface `Initialisable`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### resolveMethodToInvoke

    protected void resolveMethodToInvoke()
                                  throws InitialisationException

  Throws:
    `InitialisationException`

### lookupObjectInstance

    protected void lookupObjectInstance()
                                 throws InitialisationException

  Throws:
    `InitialisationException`

### process

    public MuleEvent process(MuleEvent event)
                      throws MuleException

  Description copied from interface: `MessageProcessor`
  Invokes the MessageProcessor.

  Specified by:
    `process` in interface `MessageProcessor`
  Parameters:
    `event` - MuleEvent to be processed
  Returns:
    optional response MuleEvent
  Throws:
    `MuleException`

### evaluateArguments

    protected Object[] evaluateArguments(MuleEvent event,
                                         List<?> argumentTemplates)
                                  throws MessagingException

  Throws:
    `MessagingException`

### evaluateExpressionCandidate

    protected Object evaluateExpressionCandidate(Object expressionCandidate,
                                                 MuleMessage message)
                                          throws TransformerException

  Throws:
    `TransformerException`

### setObject

    public void setObject(Object object)

### setMethodName

    public void setMethodName(String methodName)

### setArgumentExpressionsString

    public void setArgumentExpressionsString(String arguments)

### setArguments

    public void setArguments(List<?> arguments)

### createResultEvent

    protected MuleEvent createResultEvent(MuleEvent event,
                                          Object result)
                                   throws MuleException

  Throws:
    `MuleException`

### getName

    public String getName()

### setName

    public void setName(String name)

### setArgumentTypes

    public void setArgumentTypes(Class<?>[] argumentTypes)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### setObjectType

    public void setObjectType(Class<?> objectType)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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