Class FluentFuncRestInvoker

java.lang.Object
com.avoka.tm.svc.FluentFuncRestInvoker

public class FluentFuncRestInvoker extends Object

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 Details

    • FluentFuncRestInvoker

      public FluentFuncRestInvoker()
  • Method Details

    • setTxnId

      public FluentFuncRestInvoker setTxnId(String txnId)
      Set the id of the txn to be passed into the function.
      Parameters:
      txnId - Id for the Txn
      Returns:
      the fluent function invoker
    • setTrigger

      public FluentFuncRestInvoker setTrigger(String trigger)
      Set the trigger value for the function call
      Parameters:
      trigger - Type of trigger that initiated the function call
      Returns:
      the fluent function invoker
    • setServiceName

      public FluentFuncRestInvoker setServiceName(String serviceName)
      Set the function service name to invoke.
      Parameters:
      serviceName - the function service name to invoke (required)
      Returns:
      the fluent function invoker
    • setVersion

      public FluentFuncRestInvoker setVersion(String version)
      Set the function version to invoke.
      Parameters:
      version - function version to invoke (required)
      Returns:
      the fluent function invoker
    • setLogger

      public FluentFuncRestInvoker setLogger(Logger logger)
      Set the function logger.
      Parameters:
      logger - the function logger
      Returns:
      the fluent function invoker
      Since:
      17.10.3
    • invoke

      public FuncResult invoke()
      Invoke the fluent function and return the function result.
      Returns:
      the function result