|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.processor.InvokerMessageProcessor
public class InvokerMessageProcessor
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 |
Fields inherited from interface org.mule.api.AnnotatedObject |
---|
PROPERTY_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)
|
Object |
getAnnotation(QName name)
Gets the value of specified annotation. |
Map<QName,Object> |
getAnnotations()
Gets all annotations. |
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 |
setAnnotations(Map<QName,Object> newAnnotations)
Sets annotations to the object. |
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 |
---|
protected final transient Log 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 ExpressionManager expressionManager
protected MuleContext muleContext
Constructor Detail |
---|
public InvokerMessageProcessor()
Method Detail |
---|
public void initialise() throws InitialisationException
Initialisable
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.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered fromprotected void resolveMethodToInvoke() throws InitialisationException
InitialisationException
protected void lookupObjectInstance() throws InitialisationException
InitialisationException
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processed
MuleException
protected Object[] evaluateArguments(MuleEvent event, List<?> argumentTemplates) throws MessagingException
MessagingException
protected Object evaluateExpressionCandidate(Object expressionCandidate, MuleMessage message) throws TransformerException
TransformerException
public void setObject(Object object)
public void setMethodName(String methodName)
public void setArgumentExpressionsString(String arguments)
public void setArguments(List<?> arguments)
protected MuleEvent createResultEvent(MuleEvent event, Object result) throws MuleException
MuleException
public String getName()
public void setName(String name)
public void setArgumentTypes(Class<?>[] argumentTypes)
public String toString()
toString
in class Object
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public void setObjectType(Class<?> objectType)
public final Object getAnnotation(QName name)
AnnotatedObject
getAnnotation
in interface AnnotatedObject
public final Map<QName,Object> getAnnotations()
AnnotatedObject
getAnnotations
in interface AnnotatedObject
public final void setAnnotations(Map<QName,Object> newAnnotations)
AnnotatedObject
setAnnotations
in interface AnnotatedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |