Class DefaultFluxCapacitor.Builder
java.lang.Object
io.fluxcapacitor.javaclient.configuration.DefaultFluxCapacitor.Builder
- All Implemented Interfaces:
FluxCapacitorBuilder
- Enclosing class:
- DefaultFluxCapacitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBatchInterceptor(BatchInterceptor interceptor, MessageType... forTypes) addConsumerConfiguration(@NonNull ConsumerConfiguration consumerConfiguration) addDispatchInterceptor(@NonNull DispatchInterceptor interceptor, boolean highPriority, MessageType... forTypes) addHandlerInterceptor(@NonNull HandlerInterceptor interceptor, boolean highPriority, MessageType... forTypes) addParameterResolver(@NonNull ParameterResolver<DeserializingMessage> parameterResolver) configureDefaultConsumer(@NonNull MessageType messageType, @NonNull UnaryOperator<ConsumerConfiguration> updateFunction) protected GenericGatewaycreateRequestGateway(Client client, MessageType messageType, RequestHandler requestHandler, Map<MessageType, DispatchInterceptor> dispatchInterceptors, Map<MessageType, HandlerInterceptor> handlerInterceptors) protected Map<MessageType,List<ConsumerConfiguration>> protected FluxCapacitordoBuild(Map<MessageType, ? extends Tracking> trackingSupplier, CommandGateway commandGateway, QueryGateway queryGateway, EventGateway eventGateway, ResultGateway resultGateway, ErrorGateway errorGateway, MetricsGateway metricsGateway, WebRequestGateway webRequestGateway, AggregateRepository aggregateRepository, EventStore eventStore, KeyValueStore keyValueStore, DocumentStore documentStore, Scheduler scheduler, UserProvider userProvider, Cache cache, Serializer serializer, CorrelationDataProvider correlationDataProvider, Client client, Runnable shutdownHandler) forwardWebRequestsToLocalServer(LocalServerConfig localServerConfig, UnaryOperator<ConsumerConfiguration> consumerConfigurator) protected HandlerRegistrylocalHandlerRegistry(MessageType messageType, Map<MessageType, HandlerInterceptor> handlerInterceptors) makeApplicationInstance(boolean makeApplicationInstance) registerUserSupplier(@NonNull UserProvider userProvider) replaceCache(@NonNull Cache cache) replaceCorrelationDataProvider(CorrelationDataProvider correlationDataProvider) replaceDocumentSerializer(@NonNull DocumentSerializer documentSerializer) replaceMessageRoutingInterceptor(@NonNull DispatchInterceptor messageRoutingInterceptor) replaceRelationshipsCache(UnaryOperator<Cache> replaceFunction) replaceSerializer(@NonNull Serializer serializer) Register a custom serializer.replaceSnapshotSerializer(@NonNull Serializer serializer) replaceWebResponseMapper(WebResponseMapper webResponseMapper) withAggregateCache(Class<?> aggregateType, Cache cache) Configures a dedicated cache to use for aggregates of the given type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxcapacitor.javaclient.configuration.FluxCapacitorBuilder
addDispatchInterceptor, addHandlerInterceptor, forwardWebRequestsToLocalServer
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultConfigurations
-
replaceSerializer
Description copied from interface:FluxCapacitorBuilderRegister a custom serializer. This serializer will also be used for aggregate snapshots unless a custom snapshot serializer is registered usingFluxCapacitorBuilder.replaceSnapshotSerializer(Serializer). This serializer will also be used asDocumentSerializerif supported unless a custom document serializer is registered usingFluxCapacitorBuilder.replaceDocumentSerializer(DocumentSerializer).- Specified by:
replaceSerializerin interfaceFluxCapacitorBuilder
-
replaceCorrelationDataProvider
public FluxCapacitorBuilder replaceCorrelationDataProvider(CorrelationDataProvider correlationDataProvider) - Specified by:
replaceCorrelationDataProviderin interfaceFluxCapacitorBuilder
-
replaceSnapshotSerializer
public DefaultFluxCapacitor.Builder replaceSnapshotSerializer(@NonNull @NonNull Serializer serializer) - Specified by:
replaceSnapshotSerializerin interfaceFluxCapacitorBuilder
-
replaceDocumentSerializer
public FluxCapacitorBuilder replaceDocumentSerializer(@NonNull @NonNull DocumentSerializer documentSerializer) - Specified by:
replaceDocumentSerializerin interfaceFluxCapacitorBuilder
-
registerUserSupplier
- Specified by:
registerUserSupplierin interfaceFluxCapacitorBuilder
-
configureDefaultConsumer
public DefaultFluxCapacitor.Builder configureDefaultConsumer(@NonNull @NonNull MessageType messageType, @NonNull @NonNull UnaryOperator<ConsumerConfiguration> updateFunction) - Specified by:
configureDefaultConsumerin interfaceFluxCapacitorBuilder
-
addConsumerConfiguration
public DefaultFluxCapacitor.Builder addConsumerConfiguration(@NonNull @NonNull ConsumerConfiguration consumerConfiguration) - Specified by:
addConsumerConfigurationin interfaceFluxCapacitorBuilder
-
addBatchInterceptor
public FluxCapacitorBuilder addBatchInterceptor(BatchInterceptor interceptor, MessageType... forTypes) - Specified by:
addBatchInterceptorin interfaceFluxCapacitorBuilder
-
addDispatchInterceptor
public DefaultFluxCapacitor.Builder addDispatchInterceptor(@NonNull @NonNull DispatchInterceptor interceptor, boolean highPriority, MessageType... forTypes) - Specified by:
addDispatchInterceptorin interfaceFluxCapacitorBuilder
-
addHandlerInterceptor
public DefaultFluxCapacitor.Builder addHandlerInterceptor(@NonNull @NonNull HandlerInterceptor interceptor, boolean highPriority, MessageType... forTypes) - Specified by:
addHandlerInterceptorin interfaceFluxCapacitorBuilder
-
replaceMessageRoutingInterceptor
public DefaultFluxCapacitor.Builder replaceMessageRoutingInterceptor(@NonNull @NonNull DispatchInterceptor messageRoutingInterceptor) - Specified by:
replaceMessageRoutingInterceptorin interfaceFluxCapacitorBuilder
-
replaceCache
- Specified by:
replaceCachein interfaceFluxCapacitorBuilder
-
forwardWebRequestsToLocalServer
public FluxCapacitorBuilder forwardWebRequestsToLocalServer(LocalServerConfig localServerConfig, UnaryOperator<ConsumerConfiguration> consumerConfigurator) - Specified by:
forwardWebRequestsToLocalServerin interfaceFluxCapacitorBuilder
-
replaceWebResponseMapper
- Specified by:
replaceWebResponseMapperin interfaceFluxCapacitorBuilder
-
withAggregateCache
Description copied from interface:FluxCapacitorBuilderConfigures a dedicated cache to use for aggregates of the given type. If no dedicated cache is set aggregates will be stored in the default cache.- Specified by:
withAggregateCachein interfaceFluxCapacitorBuilder
-
replaceRelationshipsCache
- Specified by:
replaceRelationshipsCachein interfaceFluxCapacitorBuilder
-
addParameterResolver
public DefaultFluxCapacitor.Builder addParameterResolver(@NonNull @NonNull ParameterResolver<DeserializingMessage> parameterResolver) - Specified by:
addParameterResolverin interfaceFluxCapacitorBuilder
-
disableErrorReporting
- Specified by:
disableErrorReportingin interfaceFluxCapacitorBuilder
-
disableShutdownHook
- Specified by:
disableShutdownHookin interfaceFluxCapacitorBuilder
-
disableMessageCorrelation
- Specified by:
disableMessageCorrelationin interfaceFluxCapacitorBuilder
-
disablePayloadValidation
- Specified by:
disablePayloadValidationin interfaceFluxCapacitorBuilder
-
disableDataProtection
- Specified by:
disableDataProtectionin interfaceFluxCapacitorBuilder
-
disableAutomaticAggregateCaching
- Specified by:
disableAutomaticAggregateCachingin interfaceFluxCapacitorBuilder
-
enableTrackingMetrics
- Specified by:
enableTrackingMetricsin interfaceFluxCapacitorBuilder
-
makeApplicationInstance
- Specified by:
makeApplicationInstancein interfaceFluxCapacitorBuilder
-
build
- Specified by:
buildin interfaceFluxCapacitorBuilder
-
doBuild
protected FluxCapacitor doBuild(Map<MessageType, ? extends Tracking> trackingSupplier, CommandGateway commandGateway, QueryGateway queryGateway, EventGateway eventGateway, ResultGateway resultGateway, ErrorGateway errorGateway, MetricsGateway metricsGateway, WebRequestGateway webRequestGateway, AggregateRepository aggregateRepository, EventStore eventStore, KeyValueStore keyValueStore, DocumentStore documentStore, Scheduler scheduler, UserProvider userProvider, Cache cache, Serializer serializer, CorrelationDataProvider correlationDataProvider, Client client, Runnable shutdownHandler) -
createRequestGateway
protected GenericGateway createRequestGateway(Client client, MessageType messageType, RequestHandler requestHandler, Map<MessageType, DispatchInterceptor> dispatchInterceptors, Map<MessageType, HandlerInterceptor> handlerInterceptors) -
localHandlerRegistry
protected HandlerRegistry localHandlerRegistry(MessageType messageType, Map<MessageType, HandlerInterceptor> handlerInterceptors)
-