2. Reflection Entry Point Resolver:
• Reflection Entry Point Resolver is used to determine the entry point
of the component.
• Class method invocation happens based on the payload type as the
argument using reflection.
• For multiple parameters, the payload should be an Array of objects.
• If the payload is other than Array type then the respective method which
has same type of argument will be invoked.
• If the message payload is of type Null Payload the resolver will look for a
no-argument method.
3. • Below sub flow uses java components to implement Reflection Entry Point
Resolver
• Below java class "EntryPointResolver" has three methods with different
argument types.
• multipleArgumentsMethod
• singleArgumentMethod
• noArgumentsMethod(){
4.
5. • Multiple Arguments method:
Drag an expression component and write code to create Array
(strArray) of two String objects. Store that Array object into payload.
6. • Drag a java component and refer to a class "EntryPointResolver".
7. • As the payload is Array of two objects after 'Expression' component,
"multipleArgumentsMethod(String name, String dept)" method of
"EntryPointResolver" Class gets invoked.
Single Argument method:
• Drag a 'Set Payload' component and set value a string value as
"RAM". Drag a java component and refer to a class "EntryPointResolver" as
shown earlier.
• As payload is String type after 'Set payload' component,
"singleArgumentMethod(String name)" method of "EntryPointResolver"
Class gets invoked.