Interface PostProcessingFunction<I,O>

Type Parameters:
I - - input type
O - - output type
All Superinterfaces:
Function<I,O>

public interface PostProcessingFunction<I,O> extends Function<I,O>
Strategy for implementing function with post processing behavior.
The core framework only provides support for the post-processing behavior. The actual invocation of post-processing is left to the end user or the framework which integrates Spring Cloud Function. This is because post-processing can mean different things in different execution contexts. See postProcess(Message) method for more information.
Since:
4.0.3
Author:
Oleg Zhurakousky
  • Method Summary

    Modifier and Type
    Method
    Description
    default O
    apply(I t)
     
    default void
    postProcess(org.springframework.messaging.Message<O> result)
    Will post process the result of this's function invocation after this function has been triggered.

    Methods inherited from interface Function

    andThen, compose
  • Method Details

    • apply

      default O apply(I t)
      Specified by:
      apply in interface Function<I,O>
    • postProcess

      default void postProcess(org.springframework.messaging.Message<O> result)
      Will post process the result of this's function invocation after this function has been triggered.
      This operation is not managed/invoked by the core functionality of the Spring Cloud Function. It is specifically designed as a hook for other frameworks and extensions to invoke after this function was "triggered" and there is a requirement to do some post processing. The word "triggered" can mean different things in different execution contexts. For example, in spring-cloud-stream it means that the function has been invoked and the result of the function has been sent to the target destination. The boolean value argument - 'success' - allows the triggering framework to signal success or failure of its triggering operation whatever that may mean.
      Parameters:
      result - - the result of function invocation as an instance of Message including all the metadata as message headers.