-
- All Known Subinterfaces:
MultiEmitter<T>,UniEmitter<T>,UniSubscriber<T>
- All Known Implementing Classes:
AssertSubscriber,MultiSubscriberAdapter,SafeSubscriber,SerializedSubscriber,Subscribers.CallbackBasedSubscriber,SwitchableSubscriptionSubscriber,UniAssertSubscriber,UniDelegatingSubscriber,UniSerializedSubscriber
public interface ContextSupportInterface for subscribers and types that provide aContext.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Contextcontext()Provide a context.
-
-
-
Method Detail
-
context
default Context context()
Provide a context.Since calls to this method shall only be triggered when a Mutiny pipeline uses a
withContextoperator, there is no need in general for caching the context value in a field of the implementing class. Exceptions include operators that have cross-subscriber semantics such as memoizers or broadcasters.This method is expected to be called once per
withContextoperator.- Returns:
- the context, must not be
null.
-
-