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 configuration, MessageType... messageTypes) addDispatchInterceptor(@NonNull DispatchInterceptor interceptor, boolean highPriority, MessageType... forTypes) addHandlerDecorator(@NonNull HandlerDecorator interceptor, boolean highPriority, MessageType... forTypes) addParameterResolver(@NonNull ParameterResolver<? super DeserializingMessage> parameterResolver) configureDefaultConsumer(@NonNull MessageType messageType, @NonNull UnaryOperator<ConsumerConfiguration> updateFunction) protected GenericGatewaycreateRequestGateway(Client client, MessageType messageType, RequestHandler requestHandler, Map<MessageType, DispatchInterceptor> dispatchInterceptors, Map<MessageType, HandlerDecorator> handlerDecorators, List<ParameterResolver<? super DeserializingMessage>> parameterResolvers) protected FluxCapacitordoBuild(Map<MessageType, ? extends Tracking> trackingSupplier, CommandGateway commandGateway, QueryGateway queryGateway, EventGateway eventGateway, ResultGateway resultGateway, ErrorGateway errorGateway, MetricsGateway metricsGateway, WebRequestGateway webRequestGateway, AggregateRepository aggregateRepository, SnapshotStore snapshotStore, EventStore eventStore, KeyValueStore keyValueStore, DocumentStore documentStore, Scheduler scheduler, UserProvider userProvider, Cache cache, Serializer serializer, CorrelationDataProvider correlationDataProvider, IdentityProvider identityProvider, PropertySource propertySource, Client client, Runnable shutdownHandler) forwardWebRequestsToLocalServer(LocalServerConfig localServerConfig, UnaryOperator<ConsumerConfiguration> consumerConfigurator) protected ConsumerConfigurationgetDefaultConsumerConfiguration(MessageType messageType) protected HandlerRegistrylocalHandlerRegistry(MessageType messageType, Map<MessageType, HandlerDecorator> handlerDecorators, List<ParameterResolver<? super DeserializingMessage>> parameterResolvers) makeApplicationInstance(boolean makeApplicationInstance) registerUserProvider(@NonNull UserProvider userProvider) replaceCache(@NonNull Cache cache) replaceCorrelationDataProvider(@NonNull UnaryOperator<CorrelationDataProvider> replaceFunction) replaceDocumentSerializer(@NonNull DocumentSerializer documentSerializer) replaceIdentityProvider(UnaryOperator<IdentityProvider> replaceFunction) replaceMessageRoutingInterceptor(@NonNull DispatchInterceptor messageRoutingInterceptor) replacePropertySource(UnaryOperator<PropertySource> replacer) 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, addHandlerDecorator, addHandlerInterceptor, addHandlerInterceptor, addPropertySource, forwardWebRequestsToLocalServer
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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(@NonNull @NonNull UnaryOperator<CorrelationDataProvider> replaceFunction) - 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
-
registerUserProvider
- Specified by:
registerUserProviderin interfaceFluxCapacitorBuilder
-
replacePropertySource
- Specified by:
replacePropertySourcein 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 configuration, MessageType... messageTypes) - 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
-
addHandlerDecorator
public DefaultFluxCapacitor.Builder addHandlerDecorator(@NonNull @NonNull HandlerDecorator interceptor, boolean highPriority, MessageType... forTypes) - Specified by:
addHandlerDecoratorin 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
-
replaceIdentityProvider
public FluxCapacitorBuilder replaceIdentityProvider(UnaryOperator<IdentityProvider> replaceFunction) - Specified by:
replaceIdentityProviderin interfaceFluxCapacitorBuilder
-
addParameterResolver
public DefaultFluxCapacitor.Builder addParameterResolver(@NonNull @NonNull ParameterResolver<? super 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
-
disableScheduledCommandHandler
- Specified by:
disableScheduledCommandHandlerin interfaceFluxCapacitorBuilder
-
disableTrackingMetrics
- Specified by:
disableTrackingMetricsin interfaceFluxCapacitorBuilder
-
disableCacheEvictionMetrics
- Specified by:
disableCacheEvictionMetricsin interfaceFluxCapacitorBuilder
-
disableWebResponseCompression
- Specified by:
disableWebResponseCompressionin 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, SnapshotStore snapshotStore, EventStore eventStore, KeyValueStore keyValueStore, DocumentStore documentStore, Scheduler scheduler, UserProvider userProvider, Cache cache, Serializer serializer, CorrelationDataProvider correlationDataProvider, IdentityProvider identityProvider, PropertySource propertySource, Client client, Runnable shutdownHandler) -
getDefaultConsumerConfiguration
-
createRequestGateway
protected GenericGateway createRequestGateway(Client client, MessageType messageType, RequestHandler requestHandler, Map<MessageType, DispatchInterceptor> dispatchInterceptors, Map<MessageType, HandlerDecorator> handlerDecorators, List<ParameterResolver<? super DeserializingMessage>> parameterResolvers) -
localHandlerRegistry
protected HandlerRegistry localHandlerRegistry(MessageType messageType, Map<MessageType, HandlerDecorator> handlerDecorators, List<ParameterResolver<? super DeserializingMessage>> parameterResolvers)
-