public class AxonServerQueryBus extends Object implements org.axonframework.queryhandling.QueryBus, org.axonframework.queryhandling.QueryUpdateEmitter
| Constructor and Description |
|---|
AxonServerQueryBus(PlatformConnectionManager platformConnectionManager,
AxonServerConfiguration configuration,
org.axonframework.queryhandling.QueryUpdateEmitter updateEmitter,
org.axonframework.queryhandling.QueryBus localSegment,
org.axonframework.serialization.Serializer messageSerializer,
org.axonframework.serialization.Serializer genericSerializer,
QueryPriorityCalculator priorityCalculator)
Creates an instance of the AxonServerQueryBus
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,?>> filter) |
void |
completeExceptionally(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,?>> filter,
Throwable cause) |
void |
disconnect() |
<U> void |
emit(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,U>> filter,
org.axonframework.queryhandling.SubscriptionQueryUpdateMessage<U> update) |
void |
on(QueryProviderInbound.RequestCase requestCase,
Consumer<QueryProviderInbound> consumer) |
void |
publish(QueryProviderOutbound providerOutbound) |
<Q,R> CompletableFuture<org.axonframework.queryhandling.QueryResponseMessage<R>> |
query(org.axonframework.queryhandling.QueryMessage<Q,R> queryMessage) |
QueryServiceGrpc.QueryServiceStub |
queryServiceStub() |
org.axonframework.common.Registration |
registerDispatchInterceptor(org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>> dispatchInterceptor) |
org.axonframework.common.Registration |
registerHandlerInterceptor(org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>> interceptor) |
<Q,R> Stream<org.axonframework.queryhandling.QueryResponseMessage<R>> |
scatterGather(org.axonframework.queryhandling.QueryMessage<Q,R> queryMessage,
long timeout,
TimeUnit timeUnit) |
<R> org.axonframework.common.Registration |
subscribe(String queryName,
Type responseType,
org.axonframework.messaging.MessageHandler<? super org.axonframework.queryhandling.QueryMessage<?,R>> handler) |
<Q,I,U> org.axonframework.queryhandling.SubscriptionQueryResult<org.axonframework.queryhandling.QueryResponseMessage<I>,org.axonframework.queryhandling.SubscriptionQueryUpdateMessage<U>> |
subscriptionQuery(org.axonframework.queryhandling.SubscriptionQueryMessage<Q,I,U> query,
org.axonframework.queryhandling.SubscriptionQueryBackpressure backPressure,
int updateBufferSize) |
public AxonServerQueryBus(PlatformConnectionManager platformConnectionManager, AxonServerConfiguration configuration, org.axonframework.queryhandling.QueryUpdateEmitter updateEmitter, org.axonframework.queryhandling.QueryBus localSegment, org.axonframework.serialization.Serializer messageSerializer, org.axonframework.serialization.Serializer genericSerializer, QueryPriorityCalculator priorityCalculator)
platformConnectionManager - creates connection to AxonServer platformconfiguration - contains client and component names used to identify the application in AxonServerupdateEmitter - localSegment - handles incoming query requestsmessageSerializer - serializer/deserializer for payload and metadata of query requests and responsesgenericSerializer - serializer for communication of other objects than payload and metadatapriorityCalculator - calculates the request priority based on the content and adds it to the requestpublic <R> org.axonframework.common.Registration subscribe(String queryName, Type responseType, org.axonframework.messaging.MessageHandler<? super org.axonframework.queryhandling.QueryMessage<?,R>> handler)
subscribe in interface org.axonframework.queryhandling.QueryBuspublic <Q,R> CompletableFuture<org.axonframework.queryhandling.QueryResponseMessage<R>> query(org.axonframework.queryhandling.QueryMessage<Q,R> queryMessage)
query in interface org.axonframework.queryhandling.QueryBuspublic QueryServiceGrpc.QueryServiceStub queryServiceStub()
public <Q,R> Stream<org.axonframework.queryhandling.QueryResponseMessage<R>> scatterGather(org.axonframework.queryhandling.QueryMessage<Q,R> queryMessage, long timeout, TimeUnit timeUnit)
scatterGather in interface org.axonframework.queryhandling.QueryBuspublic org.axonframework.common.Registration registerHandlerInterceptor(org.axonframework.messaging.MessageHandlerInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>> interceptor)
registerHandlerInterceptor in interface org.axonframework.messaging.MessageHandlerInterceptorSupport<org.axonframework.queryhandling.QueryMessage<?,?>>public org.axonframework.common.Registration registerDispatchInterceptor(org.axonframework.messaging.MessageDispatchInterceptor<? super org.axonframework.queryhandling.QueryMessage<?,?>> dispatchInterceptor)
registerDispatchInterceptor in interface org.axonframework.messaging.MessageDispatchInterceptorSupport<org.axonframework.queryhandling.QueryMessage<?,?>>public void disconnect()
public <U> void emit(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,U>> filter, org.axonframework.queryhandling.SubscriptionQueryUpdateMessage<U> update)
emit in interface org.axonframework.queryhandling.QueryUpdateEmitterpublic void complete(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,?>> filter)
complete in interface org.axonframework.queryhandling.QueryUpdateEmitterpublic void completeExceptionally(Predicate<org.axonframework.queryhandling.SubscriptionQueryMessage<?,?,?>> filter, Throwable cause)
completeExceptionally in interface org.axonframework.queryhandling.QueryUpdateEmitterpublic void publish(QueryProviderOutbound providerOutbound)
public void on(QueryProviderInbound.RequestCase requestCase, Consumer<QueryProviderInbound> consumer)
public <Q,I,U> org.axonframework.queryhandling.SubscriptionQueryResult<org.axonframework.queryhandling.QueryResponseMessage<I>,org.axonframework.queryhandling.SubscriptionQueryUpdateMessage<U>> subscriptionQuery(org.axonframework.queryhandling.SubscriptionQueryMessage<Q,I,U> query,
org.axonframework.queryhandling.SubscriptionQueryBackpressure backPressure,
int updateBufferSize)
subscriptionQuery in interface org.axonframework.queryhandling.QueryBusCopyright © 2010–2018. All rights reserved.