public class DefaultQueryGateway extends Object implements QueryGateway
| Constructor and Description |
|---|
DefaultQueryGateway(QueryBus queryBus,
MessageDispatchInterceptor<? super QueryMessage<?,?>>... dispatchInterceptors)
Initializes the gateway to send queries to the given
queryBus and invoking given
dispatchInterceptors prior to publication ont he query bus. |
| Modifier and Type | Method and Description |
|---|---|
<R,Q> CompletableFuture<R> |
send(Q query,
String queryName,
Class<R> responseType)
sends given query to the query bus and expects a result with name resultName.
|
<R,Q> Stream<R> |
send(Q query,
String queryName,
Class<R> responseType,
long timeout,
TimeUnit timeUnit)
sends given query to the query bus and expects a stream of results with name resultName.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsend, send@SafeVarargs public DefaultQueryGateway(QueryBus queryBus, MessageDispatchInterceptor<? super QueryMessage<?,?>>... dispatchInterceptors)
queryBus and invoking given
dispatchInterceptors prior to publication ont he query bus.queryBus - The bus to deliver messages ondispatchInterceptors - The interceptors to invoke prior to publication on the buspublic <R,Q> Stream<R> send(Q query, String queryName, Class<R> responseType, long timeout, TimeUnit timeUnit)
QueryGatewaysend in interface QueryGatewayR - The type of result expected from query executionQ - The query classquery - the queryqueryName - the name of the queryresponseType - type type of resulttimeout - timeout for the requesttimeUnit - unit for the timeoutpublic <R,Q> CompletableFuture<R> send(Q query, String queryName, Class<R> responseType)
QueryGatewaysend in interface QueryGatewayR - The type of result expected from query executionQ - The query classquery - the queryqueryName - the name of the queryresponseType - the expected response typeCopyright © 2010–2017. All rights reserved.