public class InvokerMessageProcessor extends org.mule.runtime.api.meta.AbstractAnnotatedObject implements Processor, org.mule.runtime.api.lifecycle.Initialisable, FlowConstructAware
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.ReactiveProcessor.ProcessingType| Modifier and Type | Field and Description |
|---|---|
protected List<?> |
arguments |
protected Class<?>[] |
argumentTypes |
protected ExtendedExpressionManager |
expressionManager |
protected FlowConstruct |
flowConstruct |
protected org.slf4j.Logger |
logger |
protected Method |
method |
protected String |
methodName |
protected MuleContext |
muleContext |
protected String |
name |
protected Object |
object |
protected Class<?> |
objectType |
protected TemplateParser.PatternInfo |
patternInfo |
| Constructor and Description |
|---|
InvokerMessageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected Event |
createResultEvent(Event event,
Object result) |
protected Object[] |
evaluateArguments(Event event,
List<?> argumentTemplates) |
protected Object |
evaluateExpressionCandidate(Object expressionCandidate,
Event event) |
String |
getName() |
void |
initialise() |
protected void |
lookupObjectInstance() |
Event |
process(Event event)
Invokes the MessageProcessor.
|
protected void |
resolveMethodToInvoke() |
void |
setArgumentExpressionsString(String arguments) |
void |
setArguments(List<?> arguments) |
void |
setArgumentTypes(Class<?>[] argumentTypes) |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setMethodName(String methodName) |
void |
setMuleContext(MuleContext context) |
void |
setName(String name) |
void |
setObject(Object object) |
void |
setObjectType(Class<?> objectType) |
String |
toString() |
getAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProcessingTypeprotected final transient org.slf4j.Logger logger
protected Object object
protected Class<?> objectType
protected String methodName
protected List<?> arguments
protected Class<?>[] argumentTypes
protected String name
protected TemplateParser.PatternInfo patternInfo
protected Method method
protected ExtendedExpressionManager expressionManager
@Inject protected MuleContext muleContext
protected FlowConstruct flowConstruct
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected void resolveMethodToInvoke()
throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionprotected void lookupObjectInstance()
throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionpublic Event process(Event event) throws org.mule.runtime.api.exception.MuleException
Processorprotected Object[] evaluateArguments(Event event, List<?> argumentTemplates) throws MessagingException
MessagingExceptionprotected Object evaluateExpressionCandidate(Object expressionCandidate, Event event) throws TransformerException
TransformerExceptionpublic void setObject(Object object)
public void setMethodName(String methodName)
public void setArgumentExpressionsString(String arguments)
public void setArguments(List<?> arguments)
protected Event createResultEvent(Event event, Object result) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic String getName()
public void setName(String name)
public void setArgumentTypes(Class<?>[] argumentTypes)
public void setMuleContext(MuleContext context)
public void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwarepublic void setObjectType(Class<?> objectType)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.