Package com.avoka.tm.svc
Class FluentFuncRestInvoker
java.lang.Object
com.avoka.tm.svc.FluentFuncRestInvoker
Provides a Fluent Function Invoker class for executing 'Fluent Function' via the fluent REST API. Txn is passed into the invoked function by setting txnId. Also allows setting of trigger and logger.
- Since:
- 22.10.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioninvoke()
Invoke the fluent function and return the function result.Set the function logger.setServiceName
(String serviceName) Set the function service name to invoke.setTrigger
(String trigger) Set the trigger value for the function callSet the id of the txn to be passed into the function.setVersion
(String version) Set the function version to invoke.
-
Constructor Details
-
FluentFuncRestInvoker
public FluentFuncRestInvoker()
-
-
Method Details
-
setTxnId
Set the id of the txn to be passed into the function.- Parameters:
txnId
- Id for the Txn- Returns:
- the fluent function invoker
-
setTrigger
Set the trigger value for the function call- Parameters:
trigger
- Type of trigger that initiated the function call- Returns:
- the fluent function invoker
-
setServiceName
Set the function service name to invoke.- Parameters:
serviceName
- the function service name to invoke (required)- Returns:
- the fluent function invoker
-
setVersion
Set the function version to invoke.- Parameters:
version
- function version to invoke (required)- Returns:
- the fluent function invoker
-
setLogger
Set the function logger.- Parameters:
logger
- the function logger- Returns:
- the fluent function invoker
- Since:
- 17.10.3
-
invoke
Invoke the fluent function and return the function result.- Returns:
- the function result
-