Interface Context<S>

Type Parameters:
S - Any object type to wrap with this class.

public interface Context<S>
A glorified wrapper class which collects an element and abstracts it behind the Reactor API.
  • Method Details

    • getContext

      @NotNull @NotNull reactor.core.publisher.Mono<S> getContext()
      Returns:
      A Mono object which contains a single element represented by the definer of this Context class.
    • setContext

      @NotNull @NotNull reactor.core.publisher.Mono<Void> setContext(S context)
      Parameters:
      context - A separate (or identical) object identified by the definer of this Context class.
      Returns:
      A Mono object which can be used to set the element of this Context class in a non-blocking manner.
    • contextCollection

      @Nullable @Nullable Collection<S> contextCollection()
      Returns:
      A collection of objects related to the definer of this Context class.
    • fluxFromCollection

      @Nullable default @Nullable reactor.core.publisher.Flux<S> fluxFromCollection()
      Returns:
      A Flux object which contains the values of the contextCollection(), for non-blocking interpretation.