Interface FunctionInvoker

All Known Implementing Classes:
AbstractJavaFunctionInvoker, FlowInvoker, GroovyFunctionInvoker, JavaFunctionInvoker, PropFunctionInvoker, PythonFunctionInvoker, RhinoFunctionInvoker
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FunctionInvoker

Invoker is able to run function (from Java class, script, etc...) described by Function object with given parameters and return its value (null if function is void).

Unique name under which invoker is registered in InvokerRepository should be the the same as type of functions invoked by this invoker. For example:
 function[type = java]  ---(invoked by)--- invoker[name = java]
 function[type = groovy]  ---(invoked by)--- invoker[name = groovy]
 
There can be only one function invoker registered per function type.
Author:
Adam Dubiel
  • Method Summary

    Modifier and Type
    Method
    Description
    invoke(Function function, Object... args)
    Invoke function, it is a good practice to wrap any outgoing exceptions with SmartParamException with FUNCTION_INVOKE_ERROR reason.
  • Method Details

    • invoke

      Object invoke(Function function, Object... args)
      Invoke function, it is a good practice to wrap any outgoing exceptions with SmartParamException with FUNCTION_INVOKE_ERROR reason.
      Parameters:
      function - description of function to invoke
      args - arguments
      Returns:
      evaluated value (can be null)