com.hammurapi.common.concurrent

## Class MethodInvocable<C>

- java.lang.Object
- - com.hammurapi.common.concurrent.MethodInvocable<C>

- Type Parameters:
    `C` -
  All Implemented Interfaces:
    Invocable<C,Object,Object,InvocationException>

      public class MethodInvocable<C>
      extends Object
      implements Invocable<C,Object,Object,InvocationException>

  Adapts java.lang.reflect.Method to Invocable.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodInvocable(Method method)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<?>[]` | `getParameterTypes()`
    `Class<Object>` | `getReturnType()`
    `Object` | `invoke(C context, Invocation<Object> invocation, ExecutorService executorService)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MethodInvocable

          public MethodInvocable(Method method)

  - ### Method Detail

    - #### invoke

          public Object invoke(C context,
                      Invocation<Object> invocation,
                      ExecutorService executorService)
                        throws InvocationException

      Specified by:
        `invoke` in interface `Invocable<C,Object,Object,InvocationException>`
        `invocation` - Invocation
        `executorService` - Executor service for performing asynchronous processing.
      Returns:
      Throws:
        `InvocationException`

    - #### getReturnType

          public Class<Object> getReturnType()

      Specified by:
        `getReturnType` in interface `Invocable<C,Object,Object,InvocationException>`

    - #### getParameterTypes

          public Class<?>[] getParameterTypes()

      Specified by:
        `getParameterTypes` in interface `Invocable<C,Object,Object,InvocationException>`