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()
Cancels all the subscription query
Registration s which are contained by this
SubscriptionQueryRequestTarget . |
void |
onSubscriptionQueryRequest(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(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.queryProviderInbound
- a QueryProviderInbound
from which the SubscriptionQueryRequest
will
be retrieved to perform a follow up operation withpublic void onApplicationDisconnected()
Registration
s which are contained by this
SubscriptionQueryRequestTarget
.Copyright © 2010–2019. All rights reserved.