public class SubscriptionQueryRequestTarget extends Object
AxonServerQueryBus
to support the
AxonServerQueryBus.subscriptionQuery(SubscriptionQueryMessage,
SubscriptionQueryBackpressure, int)
functionality.Constructor and Description |
---|
SubscriptionQueryRequestTarget(QueryBus localSegment,
Publisher<QueryProviderOutbound> publisher,
SubscriptionMessageSerializer serializer)
Instantiate a
SubscriptionQueryRequestTarget used to receive Subscription Query requests and response. |
Modifier and Type | Method and Description |
---|---|
void |
onApplicationDisconnected(String context)
Cancels all the subscription query
Registration s for the given context which are contained by
this SubscriptionQueryRequestTarget . |
void |
onSubscriptionQueryRequest(String context,
QueryProviderInbound queryProviderInbound)
Decides, based on the wrapped
SubscriptionQueryRequest returned from the given
QueryProviderInbound , what operation to perform. |
public SubscriptionQueryRequestTarget(QueryBus localSegment, Publisher<QueryProviderOutbound> publisher, SubscriptionMessageSerializer serializer)
SubscriptionQueryRequestTarget
used to receive Subscription Query requests and response.localSegment
- a QueryBus
used to subscribe incoming Subscription Query Requests to the local
instancepublisher
- a Publisher
of type QueryProviderOutbound
to send the initial result and the
subsequent updates onserializer
- a SubscriptionMessageSerializer
used to convert the Axon Server gRPC based messages
into Axon Framework based Query messages and vice versapublic void onSubscriptionQueryRequest(String context, QueryProviderInbound queryProviderInbound)
SubscriptionQueryRequest
returned from the given
QueryProviderInbound
, what operation to perform. Can switch between subscribing in general, retrieving
the initial result and unsubscribing from future results.context
- defines the (Bounded) Context within which the given subscription query request
should be performed inqueryProviderInbound
- a QueryProviderInbound
from which the SubscriptionQueryRequest
will
be retrieved to perform a follow up operation withpublic void onApplicationDisconnected(String context)
Registration
s for the given context
which are contained by
this SubscriptionQueryRequestTarget
.context
- defines the (Bounded) Context for which the subscription query Registration
s should be
canceledCopyright © 2010–2020. All rights reserved.