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.api.model
Class InvocationResult

    java.lang.Object
      org.mule.api.model.InvocationResult

    public class InvocationResult

extends Object

TODO

Field Summary
`static int` | `STATE_INVOKE_NOT_SUPPORTED` the resover performing the invocation knows that it cannot attempt to make the invocation
`static int` | `STATE_INVOKED_FAILED` The invocation was attempted but failed
`static int` | `STATE_INVOKED_SUCESSFUL` the invocation was successful

Constructor Summary
`InvocationResult(int state)` Will construct an InvocationResult with a given state.
`InvocationResult(Object result, Method method)` Creates a result with the result payload set.

Method Summary
`String` | `getErrorMessage()` Returns the error message set on this result or null if none has been set
`String` | `getMethodCalled()` Returns the name of the method invoked, this property is only set if the state of the invocation is `STATE_INVOKED_SUCESSFUL`
`Object` | `getResult()` The result of this invocation
`int` | `getState()` Returns the state of this invocation.
`boolean` | `hasError()` Returns true if an error message has been set on this result, false otherwise
`void` | `setErrorMessage(String message)` An optional error message can be set if the invocation state is not `STATE_INVOKED_SUCESSFUL`
`void` | `setErrorNoMatchingMethods(Object component, Class<?>[] args, EntryPointResolver resolver)`
`void` | `setErrorNoMatchingMethodsCalled(Object component, String methods, EntryPointResolver resolver)`
`void` | `setErrorTooManyMatchingMethods(Object component, Class<?>[] argTypes, EntryPointResolver resolver)`
`void` | `setErrorTooManyMatchingMethods(Object component, Class<?>[] argTypes, String methods, EntryPointResolver resolver)`

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

Field Detail

### STATE_INVOKE_NOT_SUPPORTED

    public static final int STATE_INVOKE_NOT_SUPPORTED

  the resover performing the invocation knows that it cannot attempt to make the invocation

  See Also:
    Constant Field Values

### STATE_INVOKED_SUCESSFUL

    public static final int STATE_INVOKED_SUCESSFUL

  the invocation was successful

  See Also:
    Constant Field Values

### STATE_INVOKED_FAILED

    public static final int STATE_INVOKED_FAILED

  The invocation was attempted but failed

  See Also:
    Constant Field Values

Constructor Detail

### InvocationResult

    public InvocationResult(int state)

  Will construct an InvocationResult with a given state. The state must be either `STATE_INVOKE_NOT_SUPPORTED` if the resover performing the invocation knows that it cannot attempt to make the invocation `STATE_INVOKED_FAILED` If an invocation attempt is made but fails `STATE_INVOKED_SUCESSFUL` If the invocation was successful

  Parameters:
    `state` - the state of the result

### InvocationResult

    public InvocationResult(Object result,
                            Method method)

  Creates a result with the result payload set. The state of this result will be `STATE_INVOKED_SUCESSFUL` since only in this state will a result be set.

  Parameters:
    `result` - the result of a successful invocation

Method Detail

### getMethodCalled

    public String getMethodCalled()

  Returns the name of the method invoked, this property is only set if the state of the invocation is `STATE_INVOKED_SUCESSFUL`

  Returns:
    the name of the method invoked

### getResult

    public Object getResult()

  The result of this invocation

  Returns:
    an object or null if the result did not yeild a result or because the state of this invocation result is either `STATE_INVOKE_NOT_SUPPORTED` or `STATE_INVOKED_FAILED`.

### getState

    public int getState()

  Returns the state of this invocation. Possible values are: `STATE_INVOKE_NOT_SUPPORTED` if the resover performing the invocation knows that it cannot attempt to make the invocation `STATE_INVOKED_FAILED` If an invocation attempt is made but fails `STATE_INVOKED_SUCESSFUL` If the invocation was successful

### setErrorMessage

    public void setErrorMessage(String message)

  An optional error message can be set if the invocation state is not `STATE_INVOKED_SUCESSFUL`

  Parameters:
    `message` -

### hasError

    public boolean hasError()

  Returns true if an error message has been set on this result, false otherwise

  Returns:
    true if an error message has been set on this result, false otherwise

### getErrorMessage

    public String getErrorMessage()

  Returns the error message set on this result or null if none has been set

  Returns:
    the error message set on this result or null if none has been set

### setErrorTooManyMatchingMethods

    public void setErrorTooManyMatchingMethods(Object component,
                                               Class<?>[] argTypes,
                                               String methods,
                                               EntryPointResolver resolver)

### setErrorTooManyMatchingMethods

    public void setErrorTooManyMatchingMethods(Object component,
                                               Class<?>[] argTypes,
                                               EntryPointResolver resolver)

### setErrorNoMatchingMethods

    public void setErrorNoMatchingMethods(Object component,
                                          Class<?>[] args,
                                          EntryPointResolver resolver)

### setErrorNoMatchingMethodsCalled

    public void setErrorNoMatchingMethodsCalled(Object component,
                                                String methods,
                                                EntryPointResolver resolver)

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-2009 MuleSource, Inc.. All Rights Reserved.