public static class DefaultQueryGateway.Builder extends Object
DefaultQueryGateway
.
The dispatchInterceptors
is defaulted to an empty list. The QueryBus
is a
hard requirement and as such should be provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultQueryGateway |
build()
Initializes a
DefaultQueryGateway as specified through this Builder. |
DefaultQueryGateway.Builder |
dispatchInterceptors(List<MessageDispatchInterceptor<? super QueryMessage<?,?>>> dispatchInterceptors)
|
DefaultQueryGateway.Builder |
dispatchInterceptors(MessageDispatchInterceptor<? super QueryMessage<?,?>>... dispatchInterceptors)
|
DefaultQueryGateway.Builder |
queryBus(QueryBus queryBus)
|
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public DefaultQueryGateway.Builder queryBus(@Nonnull QueryBus queryBus)
queryBus
- a QueryBus
to deliver QueryMessage
s on received in this QueryGateway
implementationpublic DefaultQueryGateway.Builder dispatchInterceptors(MessageDispatchInterceptor<? super QueryMessage<?,?>>... dispatchInterceptors)
List
of MessageDispatchInterceptor
s for QueryMessage
s. Are invoked when a
query is being dispatched.dispatchInterceptors
- which are invoked when a query is being dispatchedpublic DefaultQueryGateway.Builder dispatchInterceptors(List<MessageDispatchInterceptor<? super QueryMessage<?,?>>> dispatchInterceptors)
List
of MessageDispatchInterceptor
s for QueryMessage
s. Are invoked when a
query is being dispatched.dispatchInterceptors
- which are invoked when a query is being dispatchedpublic DefaultQueryGateway build()
DefaultQueryGateway
as specified through this Builder.DefaultQueryGateway
as specified through this Builderprotected void validate() throws AxonConfigurationException
AxonConfigurationException
- if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2024. All rights reserved.