Mule School: Invoking component methods using Entry Point Resolvers


In the previous lesson Invoking Java Component Over HTTP, we learned how to invoke a simple method of a Java component in Mule Flow. Let’s now go a bit further and see how Mule maps a request message to a specific method in your component using Entry Point Resolvers.

At a high level, Mule uses three types of Entry Point Resolvers.

  1. Reflection Entry Point Resolver
  2. Annotated Entry Point Resolver
  3. Callable interface

In this article, I will focus on the Reflection Entry Point Resolver, which is used to determine the entry point on a component after a message has been received. The entry point is discovered using the message payload type(s) as the argument using reflection. For multiple parameters the payload should be an Array of objects. If the message payload is of type NullPayload the resolver will look for a no-argument method.