public class ReflectionEntryPointResolver extends AbstractEntryPointResolver
ReflectEntryPointResolver
is used to determine the entry point on a service
after an event has been received for it. The entrypoint is discovered using
the event payload type(s) as the argument using reflection. An entry point will try and match for
different argument types, so it's possible to have multiple entry points on a
single service.
For multiple parameters the payload of context.getMessage().getPayload() should be an Array of objects.
If the message payload is of type NullPayload
the resolver will look for a no-argument
method to call that doesn't match the set of ignoredMethods on the resolver.
Also a set of 'ignored' methods are available (and the use can add others) to tell the resolver to not
resolve to these methods. The default ones are:
toString()
Object.getClass()
Object.notify()
Object.notifyAll()
Object.hashCode()
Object.wait(long)
Proxy.getInvocationHandler(java.lang.Object)
Cloneable#clone()
Modifier and Type | Field and Description |
---|---|
protected WildcardFilter |
filter |
logger, methodCache
Constructor and Description |
---|
ReflectionEntryPointResolver() |
Modifier and Type | Method and Description |
---|---|
void |
addIgnoredMethod(String name) |
Collection |
getIgnoredMethods()
Returns an unmodifable Set of ignoredMethods on this resolver
To add method to the resolver use
addIgnoredMethod(String) |
InvocationResult |
invoke(Object component,
MuleEventContext context)
Will discover the entrypoint on the service using the payload type to figure out the method to call.
|
boolean |
removeIgnoredMethod(String name) |
void |
setIgnoredMethods(Collection methods) |
String |
toString() |
addMethodByArguments, addMethodByName, getCacheKeyForPayload, getMethodByArguments, getMethodByName, getPayloadFromMessage, invokeMethod, isAcceptVoidMethods, isTransformFirst, setAcceptVoidMethods, setTransformFirst
protected WildcardFilter filter
public Collection getIgnoredMethods()
addIgnoredMethod(String)
public void setIgnoredMethods(Collection methods)
public void addIgnoredMethod(String name)
public boolean removeIgnoredMethod(String name)
public InvocationResult invoke(Object component, MuleEventContext context) throws Exception
NullPayload
the resolver will look for a no-argument
method to call that doesn't match the set of ignoredMethods on the resover.service
- context
- Exception
public String toString()
toString
in class AbstractEntryPointResolver
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.