Class AxonServerSubscriptionQueryResult<I,U>
java.lang.Object
org.axonframework.axonserver.connector.query.subscription.AxonServerSubscriptionQueryResult<I,U>
- All Implemented Interfaces:
AutoCloseable,Registration,SubscriptionQueryResult<QueryResponseMessage<I>,SubscriptionQueryUpdateMessage<U>>
public class AxonServerSubscriptionQueryResult<I,U>
extends Object
implements SubscriptionQueryResult<QueryResponseMessage<I>,SubscriptionQueryUpdateMessage<U>>
A
SubscriptionQueryResult that emits initial response and update when subscription query response message is
received.- Since:
- 4.0
- Author:
- Sara Pellegrini, Stefan Dragisic, Steven van Beelen, Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionAxonServerSubscriptionQueryResult(io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SubscriptionMessageSerializer subscriptionSerializer) Deprecated.AxonServerSubscriptionQueryResult(io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SpanFactory spanFactory, SubscriptionMessageSerializer subscriptionSerializer) Deprecated.Deprecated in favor of constructor with aQueryBusSpanFactory.AxonServerSubscriptionQueryResult(SubscriptionQueryMessage<?, ?, ?> queryMessage, io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SubscriptionMessageSerializer subscriptionSerializer, QueryBusSpanFactory spanFactory, Span parentSpan) Instantiate aAxonServerSubscriptionQueryResultwhich will emit its initial response and the updates of the subscription query. -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()Cancels this Registration.reactor.core.publisher.Mono<QueryResponseMessage<I>> Subscribing to this mono will trigger invocation of query handler.reactor.core.publisher.Flux<SubscriptionQueryUpdateMessage<U>> updates()When there is an update to the subscription query, it will be emitted to this flux.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.common.Registration
closeMethods inherited from interface org.axonframework.queryhandling.SubscriptionQueryResult
handle, handle
-
Constructor Details
-
AxonServerSubscriptionQueryResult
@Deprecated public AxonServerSubscriptionQueryResult(io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SubscriptionMessageSerializer subscriptionSerializer) Deprecated.Deprecated in favor of constructor with aSpanFactory. This constructor defaults to aNoOpSpanFactory.Instantiate aAxonServerSubscriptionQueryResultwhich will emit its initial response and the updates of the subscription query. -
AxonServerSubscriptionQueryResult
@Deprecated public AxonServerSubscriptionQueryResult(io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SpanFactory spanFactory, SubscriptionMessageSerializer subscriptionSerializer) Deprecated.Deprecated in favor of constructor with aQueryBusSpanFactory. This constructor defaults to aDefaultQueryBusSpanFactorywith the providedSpanFactory.Instantiate aAxonServerSubscriptionQueryResultwhich will emit its initial response and the updates of the subscription query. -
AxonServerSubscriptionQueryResult
public AxonServerSubscriptionQueryResult(SubscriptionQueryMessage<?, ?, ?> queryMessage, io.axoniq.axonserver.connector.query.SubscriptionQueryResult result, SubscriptionMessageSerializer subscriptionSerializer, QueryBusSpanFactory spanFactory, Span parentSpan) Instantiate aAxonServerSubscriptionQueryResultwhich will emit its initial response and the updates of the subscription query.
-
-
Method Details
-
initialResult
Description copied from interface:SubscriptionQueryResultSubscribing to this mono will trigger invocation of query handler. The return value of that query handler will be passed to the mono, once it's ready.- Specified by:
initialResultin interfaceSubscriptionQueryResult<I,U> - Returns:
- the mono representing the initial result
-
updates
Description copied from interface:SubscriptionQueryResultWhen there is an update to the subscription query, it will be emitted to this flux.- Specified by:
updatesin interfaceSubscriptionQueryResult<I,U> - Returns:
- the flux representing the incremental updates
-
cancel
public boolean cancel()Description copied from interface:RegistrationCancels this Registration. If the Registration was already cancelled, no action is taken.- Specified by:
cancelin interfaceRegistration- Returns:
trueif this handler is successfully deregistered,falseif this handler was not currently registered.
-
SpanFactory.