Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.model.resolvers
Class ReflectionEntryPointResolver

    java.lang.Object
      org.mule.model.resolvers.AbstractEntryPointResolver
          org.mule.model.resolvers.ReflectionEntryPointResolver

All Implemented Interfaces:
  EntryPointResolver

Direct Known Subclasses:
  AbstractArgumentEntryPointResolver

    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)`
- 'is*'
- 'get*'.
- 'set*'.

Note that wildcard expressions can be used.

Field Summary
`protected WildcardFilter` | `filter`

Constructor Summary
`ReflectionEntryPointResolver()`

Method Summary
`void` | `addIgnoredMethod(String name)`
`Set<String>` | `getIgnoredMethods()` Returns an unmodifiable 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(Set<String> methods)`
`String` | `toString()`

Methods inherited from class org.mule.model.resolvers.AbstractEntryPointResolver
`addMethodByArguments, addMethodByName, getCacheKeyForPayload, getMethodByArguments, getMethodByName, getMethodCache, getPayloadFromMessage, invokeMethod, isAcceptVoidMethods, isSynchronizeCall, setAcceptVoidMethods, setSynchronizeCall`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### filter

    protected WildcardFilter filter

Constructor Detail

### ReflectionEntryPointResolver

    public ReflectionEntryPointResolver()

Method Detail

### getIgnoredMethods

    public Set<String> getIgnoredMethods()

  Returns an unmodifiable Set of ignoredMethods on this resolver To add method to the resolver use `addIgnoredMethod(String)`

  Returns:
    unmodifiable set of method names set on this resolver

### setIgnoredMethods

    public void setIgnoredMethods(Set<String> methods)

### addIgnoredMethod

    public void addIgnoredMethod(String name)

### removeIgnoredMethod

    public boolean removeIgnoredMethod(String name)

### invoke

    public InvocationResult invoke(Object component,
                                   MuleEventContext context)
                            throws Exception

  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.

  Throws:
    `Exception`

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractEntryPointResolver`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.