public interface SubscriptionQueryResult<I,U> extends Registration
QueryBus.subscriptionQuery(SubscriptionQueryMessage, int)
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
default void |
handle(Consumer<? super I> initialResultConsumer,
Consumer<? super U> updateConsumer)
Deprecated.
Please use
handle(Consumer, Consumer, Consumer) instead, to consciously deal with any
exceptions with the errorConsumer . |
default void |
handle(Consumer<? super I> initialResultConsumer,
Consumer<? super U> updateConsumer,
Consumer<Throwable> errorConsumer)
Delegates handling of initial result and incremental updates to the provided consumers.
|
reactor.core.publisher.Mono<I> |
initialResult()
Subscribing to this mono will trigger invocation of query handler.
|
reactor.core.publisher.Flux<U> |
updates()
When there is an update to the subscription query, it will be emitted to this flux.
|
cancel, close
reactor.core.publisher.Mono<I> initialResult()
reactor.core.publisher.Flux<U> updates()
@Deprecated default void handle(Consumer<? super I> initialResultConsumer, Consumer<? super U> updateConsumer)
handle(Consumer, Consumer, Consumer)
instead, to consciously deal with any
exceptions with the errorConsumer
.Subscription to the incremental updates is done after the initial result is retrieved and its consumer is invoked. If anything goes wrong during invoking or consuming initial result or incremental updates, subscription is cancelled.
default void handle(Consumer<? super I> initialResultConsumer, Consumer<? super U> updateConsumer, Consumer<Throwable> errorConsumer)
Subscription to the incremental updates is done after the initial result is retrieved and its consumer is
invoked. If anything goes wrong during invoking or consuming initial result or incremental updates, subscription
is cancelled after invoking the given errorConsumer
.
initialResultConsumer
- The Consumer
to be invoked when the initial result is retrieved.updateConsumer
- The Consumer
to be invoked when incremental updates are emitted.errorConsumer
- A Consumer
of Exception
used to react to an exception resulting from
the initialResult()
or updates()
.Copyright © 2010–2024. All rights reserved.