org.fourthline.cling.model.action

## Class MethodActionExecutor

- java.lang.Object
- - org.fourthline.cling.model.action.AbstractActionExecutor
  - - org.fourthline.cling.model.action.MethodActionExecutor

- All Implemented Interfaces:
    ActionExecutor

      public class MethodActionExecutor
      extends AbstractActionExecutor

  Invokes methods on a service implementation instance with reflection.

  If the method has an additional last parameter of type `RemoteClientInfo`, the details of the control point client will be provided to the action method. You can use this to get the client's address and request headers, and to provide extra response headers.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Method` | `method`

    - ### Fields inherited from class org.fourthline.cling.model.action.AbstractActionExecutor

      `outputArgumentAccessors`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodActionExecutor(Map<ActionArgument<LocalService>,StateVariableAccessor> outputArgumentAccessors, Method method)`
    `MethodActionExecutor(Method method)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object[]` | `createInputArgumentValues(ActionInvocation<LocalService> actionInvocation, Method method)`
    `protected void` | `execute(ActionInvocation<LocalService> actionInvocation, Object serviceImpl)`
    `Method` | `getMethod()`
    `protected boolean` | `isUseOutputArgumentAccessors(ActionInvocation<LocalService> actionInvocation)`

    - ### Methods inherited from class org.fourthline.cling.model.action.AbstractActionExecutor

      `execute, getOutputArgumentAccessors, readOutputArgumentValues, setOutputArgumentValue`

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

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

- - ### Field Detail

    - #### method

          protected Method method

  - ### Constructor Detail

    - #### MethodActionExecutor

          public MethodActionExecutor(Method method)

    - #### MethodActionExecutor

          public MethodActionExecutor(Map<ActionArgument<LocalService>,StateVariableAccessor> outputArgumentAccessors,
                                      Method method)

  - ### Method Detail

    - #### getMethod

          public Method getMethod()

    - #### execute

          protected void execute(ActionInvocation<LocalService> actionInvocation,
                                 Object serviceImpl)
                          throws Exception

      Specified by:
        `execute` in class `AbstractActionExecutor`
      Throws:
        `Exception`

    - #### isUseOutputArgumentAccessors

          protected boolean isUseOutputArgumentAccessors(ActionInvocation<LocalService> actionInvocation)

    - #### createInputArgumentValues

          protected Object[] createInputArgumentValues(ActionInvocation<LocalService> actionInvocation,
                                                       Method method)
                                                throws ActionException

      Throws:
        `ActionException`

Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.