org.mule.model.resolvers
Class AbstractArgumentEntryPointResolver

java.lang.Object
  extended by org.mule.model.resolvers.AbstractEntryPointResolver
      extended by org.mule.model.resolvers.ReflectionEntryPointResolver
          extended by 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 meothds 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 'ingorred' 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.


Field Summary
 
Fields inherited from class org.mule.model.resolvers.ReflectionEntryPointResolver
filter
 
Fields inherited from class org.mule.model.resolvers.AbstractEntryPointResolver
logger, methodCache
 
Constructor Summary
AbstractArgumentEntryPointResolver()
           
 
Method Summary
 void addMethod(String name)
           
protected abstract  Class[] getMethodArgumentTypes(Object[] payload)
           
 Set getMethods()
           
 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 isEnableDiscovery()
           
 boolean removeMethod(String name)
           
 void setEnableDiscovery(boolean enableDiscovery)
           
 void setMethods(Set methods)
           
 String toString()
           
 
Methods inherited from class org.mule.model.resolvers.ReflectionEntryPointResolver
addIgnoredMethod, getIgnoredMethods, removeIgnoredMethod, setIgnoredMethods
 
Methods inherited from class org.mule.model.resolvers.AbstractEntryPointResolver
addMethodByArguments, addMethodByName, getCacheKeyForPayload, getMethodByArguments, getMethodByName, getPayloadFromMessage, invokeMethod, isAcceptVoidMethods, isTransformFirst, setAcceptVoidMethods, setTransformFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractArgumentEntryPointResolver

public AbstractArgumentEntryPointResolver()
Method Detail

getMethods

public Set getMethods()

setMethods

public void setMethods(Set 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-2009 MuleSource, Inc.. All Rights Reserved.