public interface MultiInterceptor
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ORDINAL
Default ordinal value.
|
| Modifier and Type | Method and Description |
|---|---|
default <T> Multi<T> |
onMultiCreation(Multi<T> multi)
Method called when a new instance of
Multi is created. |
default <T> org.reactivestreams.Subscriber<? super T> |
onSubscription(org.reactivestreams.Publisher<? extends T> instance,
org.reactivestreams.Subscriber<? super T> subscriber)
Method called when a subscriber subscribes to a
Multi. |
default int |
ordinal() |
static final int DEFAULT_ORDINAL
default int ordinal()
default <T> Multi<T> onMultiCreation(Multi<T> multi)
Multi is created. If can return a new Multi,
or the passed Multi (default behavior) if the interceptor is not interested by this Multi.
One use case for this method is the capture of a context at creation time (when the method is called) and
restored when a subscriber subscribed to the produced multi. It is recommended to extend
AbstractMulti to produce a new Multi instance.
T - the type of item produced by the multimulti - the created multinulldefault <T> org.reactivestreams.Subscriber<? super T> onSubscription(org.reactivestreams.Publisher<? extends T> instance,
org.reactivestreams.Subscriber<? super T> subscriber)
Multi.
This method lets you substitute the subscriber.T - the type of iteminstance - the instance of publishersubscriber - the subscriberCopyright © 2019–2020 SmallRye. All rights reserved.