public interface QueryGateway
| Modifier and Type | Method and Description |
|---|---|
default <R,Q> CompletableFuture<R> |
query(Q query,
Class<R> responseType)
Sends given
query over the QueryBus, expecting a response with
the given responseType from a single source. |
default <R,Q> CompletableFuture<R> |
query(Q query,
ResponseType<R> responseType)
Sends given
query over the QueryBus, expecting a response in the
form of responseType from a single source. |
default <R,Q> CompletableFuture<R> |
query(String queryName,
Q query,
Class<R> responseType)
Sends given
query over the QueryBus, expecting a response with
the given responseType from a single source. |
<R,Q> CompletableFuture<R> |
query(String queryName,
Q query,
ResponseType<R> responseType)
Sends given
query over the QueryBus, expecting a response in the
form of responseType from a single source. |
default <R,Q> Stream<R> |
scatterGather(Q query,
ResponseType<R> responseType,
long timeout,
TimeUnit timeUnit)
Sends given
query over the QueryBus, expecting a response in the
form of responseType from several sources. |
<R,Q> Stream<R> |
scatterGather(String queryName,
Q query,
ResponseType<R> responseType,
long timeout,
TimeUnit timeUnit)
Sends given
query over the QueryBus, expecting a response in the
form of responseType from several sources. |
default <R,Q> CompletableFuture<R> |
send(Q query,
Class<R> responseType)
Deprecated.
Use
query(Object, Class) instead. |
default <R,Q> Stream<R> |
send(Q query,
Class<R> responseType,
long timeout,
TimeUnit timeUnit)
Deprecated.
Use
scatterGather(Object, ResponseType, long, TimeUnit) instead. |
default <R,Q> Stream<R> |
send(Q query,
String queryName,
Class<R> resultClass,
long timeout,
TimeUnit timeUnit)
Deprecated.
|
default <R,Q> CompletableFuture<R> |
send(String queryName,
Q query,
Class<R> responseType)
Deprecated.
Use
query(String, Object, Class) instead. |
default <Q,I,U> SubscriptionQueryResult<I,U> |
subscriptionQuery(Q query,
Class<I> initialResponseType,
Class<U> updateResponseType)
Sends given
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side). |
default <Q,I,U> SubscriptionQueryResult<I,U> |
subscriptionQuery(Q query,
ResponseType<I> initialResponseType,
ResponseType<U> updateResponseType)
Sends given
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side). |
default <Q,I,U> SubscriptionQueryResult<I,U> |
subscriptionQuery(String queryName,
Q query,
Class<I> initialResponseType,
Class<U> updateResponseType)
Sends given
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side). |
default <Q,I,U> SubscriptionQueryResult<I,U> |
subscriptionQuery(String queryName,
Q query,
ResponseType<I> initialResponseType,
ResponseType<U> updateResponseType,
SubscriptionQueryBackpressure backpressure)
Sends given
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side). |
<Q,I,U> SubscriptionQueryResult<I,U> |
subscriptionQuery(String queryName,
Q query,
ResponseType<I> initialResponseType,
ResponseType<U> updateResponseType,
SubscriptionQueryBackpressure backpressure,
int updateBufferSize)
Sends given
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side). |
default <R,Q> CompletableFuture<R> query(Q query, Class<R> responseType)
query over the QueryBus, expecting a response with
the given responseType from a single source. The query name will be derived from the provided
query. Execution may be asynchronous, depending on the QueryBus implementation.R - The response class contained in the given responseTypeQ - The query classquery - The query to be sentresponseType - A Class describing the desired response typeCompletableFuture containing the query result as dictated by the given
responseTypedefault <R,Q> CompletableFuture<R> query(String queryName, Q query, Class<R> responseType)
query over the QueryBus, expecting a response with
the given responseType from a single source. Execution may be asynchronous, depending on the QueryBus
implementation.R - The response class contained in the given responseTypeQ - The query classqueryName - A String describing the query to be executedquery - The query to be sentresponseType - The ResponseType used for this queryCompletableFuture containing the query result as dictated by the given
responseTypedefault <R,Q> CompletableFuture<R> query(Q query, ResponseType<R> responseType)
query over the QueryBus, expecting a response in the
form of responseType from a single source. The query name will be derived from the provided
query. Execution may be asynchronous, depending on the QueryBus implementation.R - The response class contained in the given responseTypeQ - The query classquery - The query to be sentresponseType - The ResponseType used for this queryCompletableFuture containing the query result as dictated by the given
responseType<R,Q> CompletableFuture<R> query(String queryName, Q query, ResponseType<R> responseType)
query over the QueryBus, expecting a response in the
form of responseType from a single source. Execution may be asynchronous, depending on the QueryBus
implementation.R - The response class contained in the given responseTypeQ - The query classqueryName - A String describing the query to be executedquery - The query to be sentresponseType - The ResponseType used for this queryCompletableFuture containing the query result as dictated by the given
responseTypedefault <R,Q> Stream<R> scatterGather(Q query, ResponseType<R> responseType, long timeout, TimeUnit timeUnit)
query over the QueryBus, expecting a response in the
form of responseType from several sources. The stream is completed when a timeout occurs or when
all results are received. The query name will be derived from the provided query. Execution may be
asynchronous, depending on the QueryBus implementation.R - The response class contained in the given responseTypeQ - The query classquery - The query to be sentresponseType - The ResponseType used for this querytimeout - A timeout of long for the querytimeUnit - The selected TimeUnit for the given timeout<R,Q> Stream<R> scatterGather(String queryName, Q query, ResponseType<R> responseType, long timeout, TimeUnit timeUnit)
query over the QueryBus, expecting a response in the
form of responseType from several sources. The stream is completed when a timeout occurs or when
all results are received. Execution may be asynchronous, depending on the QueryBus implementation.R - The response class contained in the given responseTypeQ - The query classqueryName - A String describing the query to be executedquery - The query to be sentresponseType - The ResponseType used for this querytimeout - A timeout of long for the querytimeUnit - The selected TimeUnit for the given timeoutdefault <Q,I,U> SubscriptionQueryResult<I,U> subscriptionQuery(Q query, Class<I> initialResponseType, Class<U> updateResponseType)
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side).Q - The type of the queryI - The type of the initial responseU - The type of the incremental updatequery - The query to be sentinitialResponseType - The initial response type used for this queryupdateResponseType - The update response type used for this queryQueryBus.subscriptionQuery(SubscriptionQueryMessage),
QueryBus.subscriptionQuery(SubscriptionQueryMessage, SubscriptionQueryBackpressure, int)default <Q,I,U> SubscriptionQueryResult<I,U> subscriptionQuery(String queryName, Q query, Class<I> initialResponseType, Class<U> updateResponseType)
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side).Q - The type of the queryI - The type of the initial responseU - The type of the incremental updatequeryName - A String describing query to be executedquery - The query to be sentinitialResponseType - The initial response type used for this queryupdateResponseType - The update response type used for this queryQueryBus.subscriptionQuery(SubscriptionQueryMessage),
QueryBus.subscriptionQuery(SubscriptionQueryMessage, SubscriptionQueryBackpressure, int)default <Q,I,U> SubscriptionQueryResult<I,U> subscriptionQuery(Q query, ResponseType<I> initialResponseType, ResponseType<U> updateResponseType)
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side).Q - The type of the queryI - The type of the initial responseU - The type of the incremental updatequery - The query to be sentinitialResponseType - The initial response type used for this queryupdateResponseType - The update response type used for this queryQueryBus.subscriptionQuery(SubscriptionQueryMessage),
QueryBus.subscriptionQuery(SubscriptionQueryMessage, SubscriptionQueryBackpressure, int)default <Q,I,U> SubscriptionQueryResult<I,U> subscriptionQuery(String queryName, Q query, ResponseType<I> initialResponseType, ResponseType<U> updateResponseType, SubscriptionQueryBackpressure backpressure)
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side).Q - The type of the queryI - The type of the initial responseU - The type of the incremental updatequeryName - A String describing query to be executedquery - The query to be sentinitialResponseType - The initial response type used for this queryupdateResponseType - The update response type used for this querybackpressure - The backpressure mechanism to deal with producing of incremental updatesQueryBus.subscriptionQuery(SubscriptionQueryMessage),
QueryBus.subscriptionQuery(SubscriptionQueryMessage, SubscriptionQueryBackpressure, int)<Q,I,U> SubscriptionQueryResult<I,U> subscriptionQuery(String queryName, Q query, ResponseType<I> initialResponseType, ResponseType<U> updateResponseType, SubscriptionQueryBackpressure backpressure, int updateBufferSize)
query over the QueryBus and returns result containing initial response and
incremental updates (received at the moment the query is sent, until it is cancelled by the caller or closed by
the emitting side).Q - The type of the queryI - The type of the initial responseU - The type of the incremental updatequeryName - A String describing query to be executedquery - The query to be sentinitialResponseType - The initial response type used for this queryupdateResponseType - The update response type used for this querybackpressure - The backpressure mechanism to deal with producing of incremental updatesupdateBufferSize - The size of buffer which accumulates updates before subscription to the flux
is madeQueryBus.subscriptionQuery(SubscriptionQueryMessage),
QueryBus.subscriptionQuery(SubscriptionQueryMessage, SubscriptionQueryBackpressure, int)@Deprecated default <R,Q> CompletableFuture<R> send(String queryName, Q query, Class<R> responseType)
query(String, Object, Class) instead.R - The type of result expected from query execution.Q - The query class.query - The query.queryName - The name of the query.responseType - The expected result type.NullPointerException - when query is null.@Deprecated default <R,Q> CompletableFuture<R> send(Q query, Class<R> responseType)
query(Object, Class) instead.R - The type of result expected from query execution.Q - The query class.query - The query.responseType - The expected result type.NullPointerException - when query is null.@Deprecated default <R,Q> Stream<R> send(Q query, Class<R> responseType, long timeout, TimeUnit timeUnit)
scatterGather(Object, ResponseType, long, TimeUnit) instead.R - The type of result expected from query execution.Q - The query class.query - The query.responseType - The expected result type.timeout - Timeout for the request.timeUnit - Unit for the timeout.NullPointerException - when query is null.@Deprecated default <R,Q> Stream<R> send(Q query, String queryName, Class<R> resultClass, long timeout, TimeUnit timeUnit)
scatterGather(String, Object, ResponseType, long, TimeUnit) instead.R - The type of result expected from query execution.Q - The query class.query - The query.queryName - The name of the query.resultClass - Type type of result.timeout - Timeout for the request.timeUnit - Unit for the timeout.Copyright © 2010–2018. All rights reserved.