org.mule.impl.model.resolvers
Class AnnotatedEntryPointResolver

java.lang.Object
  extended by org.mule.model.resolvers.AbstractEntryPointResolver
      extended by org.mule.impl.model.resolvers.AnnotatedEntryPointResolver
All Implemented Interfaces:
EntryPointResolver

public class AnnotatedEntryPointResolver
extends AbstractEntryPointResolver

A Mule EntryPointResolver implementation that will resolve methods on a service class that have Mule expression annotations such as Payload, InboundHeaders It will transform the received message to match the annotated method arguments. For example - public Object doSomething( @XPath ("/foo/bar") String bar, @Payload Document doc, @InboundHeaders("name") String name) { //do stuff } The component method above will be invoked by running the XPath expression on the payload, adding a second parameter as the payload itself and passing in the header 'name' as the third parameter. There are some rules for how components with annotations will be processed -

Since:
3.0
See Also:
Payload, InboundHeaders, InboundAttachments, OutboundHeaders, OutboundAttachments, Mule

Constructor Summary
AnnotatedEntryPointResolver()
           
 
Method Summary
protected  Object[] getPayloadForMethod(Method method, Object component, MuleEventContext context)
           
protected  Object[] getPayloadFromMessageWithAnnotations(Method method, MuleEventContext context)
           
protected  void initCache(Object component, MuleEventContext context)
           
 InvocationResult invoke(Object component, MuleEventContext context)
           
 String toString()
           
 
Methods inherited from class org.mule.model.resolvers.AbstractEntryPointResolver
addMethodByArguments, addMethodByName, getCacheKeyForPayload, getMethodByArguments, getMethodByName, getMethodCache, getPayloadFromMessage, invokeMethod, isAcceptVoidMethods, isSynchronizeCall, setAcceptVoidMethods, setSynchronizeCall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotatedEntryPointResolver

public AnnotatedEntryPointResolver()
Method Detail

invoke

public InvocationResult invoke(Object component,
                               MuleEventContext context)
                        throws Exception
Throws:
Exception

getPayloadForMethod

protected Object[] getPayloadForMethod(Method method,
                                       Object component,
                                       MuleEventContext context)
                                throws TransformerException,
                                       InitialisationException
Throws:
TransformerException
InitialisationException

getPayloadFromMessageWithAnnotations

protected Object[] getPayloadFromMessageWithAnnotations(Method method,
                                                        MuleEventContext context)
                                                 throws TransformerException,
                                                        InitialisationException
Throws:
TransformerException
InitialisationException

toString

public String toString()
Overrides:
toString in class AbstractEntryPointResolver

initCache

protected void initCache(Object component,
                         MuleEventContext context)


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