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.
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).
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 TypeMethodDescriptionInvoke function, it is a good practice to wrap any outgoing exceptions withSmartParamExceptionwith FUNCTION_INVOKE_ERROR reason.
-
Method Details
-
invoke
Invoke function, it is a good practice to wrap any outgoing exceptions withSmartParamExceptionwith FUNCTION_INVOKE_ERROR reason.- Parameters:
function- description of function to invokeargs- arguments- Returns:
- evaluated value (can be null)
-