Package io.github.simplexdevelopment.api
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 Summary
Modifier and TypeMethodDescription@Nullable Collection<S>
default @Nullable reactor.core.publisher.Flux<S>
@NotNull reactor.core.publisher.Mono<S>
@NotNull reactor.core.publisher.Mono<Void>
setContext
(S context)
-
Method Details
-
getContext
- Returns:
- A Mono object which contains a single element represented by the definer of this Context class.
-
setContext
- 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
- Returns:
- A collection of objects related to the definer of this Context class.
-
fluxFromCollection
- Returns:
- A Flux object which contains the values of the
contextCollection()
, for non-blocking interpretation.
-