org.mule.model.resolvers
Class AbstractArgumentEntryPointResolver
java.lang.Object
org.mule.model.resolvers.AbstractEntryPointResolver
org.mule.model.resolvers.ReflectionEntryPointResolver
org.mule.model.resolvers.AbstractArgumentEntryPointResolver
- All Implemented Interfaces:
- EntryPointResolver
- Direct Known Subclasses:
- ArrayEntryPointResolver, NoArgumentsEntryPointResolver
public abstract class AbstractArgumentEntryPointResolver
- extends ReflectionEntryPointResolver
A base class that allows implementing resolvers to define what parameters it is expecting. Currently
there are two implementations of this NoArgumentsEntryPointResolver
, that
allows methods with no arguments to be invoked and ArrayEntryPointResolver
that
allows for methods that accept an array type to be invoked.
Users can set explicit method names on this resolver to control which methods are allowed to be called. 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:
Note that wildcard expressions can be used.
Methods inherited from class org.mule.model.resolvers.AbstractEntryPointResolver |
addMethodByArguments, addMethodByName, getCacheKeyForPayload, getMethodByArguments, getMethodByName, getMethodCache, getPayloadFromMessage, invokeMethod, isAcceptVoidMethods, isSynchronizeCall, setAcceptVoidMethods, setSynchronizeCall |
AbstractArgumentEntryPointResolver
public AbstractArgumentEntryPointResolver()
getMethods
public Set<String> getMethods()
setMethods
public void setMethods(Set<String> methods)
addMethod
public void addMethod(String name)
removeMethod
public boolean removeMethod(String name)
isEnableDiscovery
public boolean isEnableDiscovery()
setEnableDiscovery
public void setEnableDiscovery(boolean enableDiscovery)
invoke
public InvocationResult invoke(Object component,
MuleEventContext context)
throws Exception
- Description copied from class:
ReflectionEntryPointResolver
- Will discover the entrypoint on the service using the payload type to figure out the method to call.
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 resover.
- Specified by:
invoke
in interface EntryPointResolver
- Overrides:
invoke
in class ReflectionEntryPointResolver
- Throws:
Exception
getMethodArgumentTypes
protected abstract Class<?>[] getMethodArgumentTypes(Object[] payload)
toString
public String toString()
- Overrides:
toString
in class ReflectionEntryPointResolver
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.