public class AxonServerSubscriptionQueryResult extends Object implements Supplier<SubscriptionQueryResult<QueryResponse,QueryUpdate>>, io.grpc.stub.StreamObserver<SubscriptionQueryResponse>
SubscriptionQueryResult that emits initial response and update when subscription query response message is
received.| Constructor and Description |
|---|
AxonServerSubscriptionQueryResult(SubscriptionQuery subscriptionQuery,
Function<io.grpc.stub.StreamObserver<SubscriptionQueryResponse>,io.grpc.stub.StreamObserver<SubscriptionQueryRequest>> openStreamFn,
AxonServerConfiguration configuration,
SubscriptionQueryBackpressure backPressure,
int bufferSize,
Runnable onDispose)
Instantiate a
AxonServerSubscriptionQueryResult which will emit its initial response and the updates of
the subscription query. |
| Modifier and Type | Method and Description |
|---|---|
SubscriptionQueryResult<QueryResponse,QueryUpdate> |
get() |
void |
onCompleted() |
void |
onError(Throwable t) |
void |
onNext(SubscriptionQueryResponse response) |
public AxonServerSubscriptionQueryResult(SubscriptionQuery subscriptionQuery, Function<io.grpc.stub.StreamObserver<SubscriptionQueryResponse>,io.grpc.stub.StreamObserver<SubscriptionQueryRequest>> openStreamFn, AxonServerConfiguration configuration, SubscriptionQueryBackpressure backPressure, int bufferSize, Runnable onDispose)
AxonServerSubscriptionQueryResult which will emit its initial response and the updates of
the subscription query.subscriptionQuery - the SubscriptionQuery which is sentopenStreamFn - a Function used to open the stream resultsconfiguration - a AxonServerConfiguration providing the specified flow control settingsbackPressure - the used SubscriptionQueryBackpressure for the subsequent updates of the
subscription querybufferSize - an int specifying the buffer size of the updatesonDispose - a Runnable which will be Runnable.run() this subscription query has
completed (exceptionally)public void onNext(SubscriptionQueryResponse response)
onNext in interface io.grpc.stub.StreamObserver<SubscriptionQueryResponse>public void onError(Throwable t)
onError in interface io.grpc.stub.StreamObserver<SubscriptionQueryResponse>public void onCompleted()
onCompleted in interface io.grpc.stub.StreamObserver<SubscriptionQueryResponse>public SubscriptionQueryResult<QueryResponse,QueryUpdate> get()
get in interface Supplier<SubscriptionQueryResult<QueryResponse,QueryUpdate>>Copyright © 2010–2020. All rights reserved.