Interface FluxzeroConfiguration
- All Known Subinterfaces:
FluxzeroBuilder
- All Known Implementing Classes:
DefaultFluxzero.Builder
public interface FluxzeroConfiguration
Central configuration interface for a Fluxzero client instance.
This interface exposes all essential configuration components and extension points that influence message serialization, handler invocation, scheduling, caching, dispatching, user context, and more.
Implementations of this interface are typically created via FluxzeroBuilder and can be
accessed through Fluxzero.configuration() at runtime.
Responsibilities
- Provide serializers for messages, snapshots, and documents.
- Define consumer tracking and dispatch configuration per
MessageType. - Register interceptors and decorators for dispatching, batching, and handling messages.
- Expose services like clock, caching, scheduling, and task execution.
- Supply user and identity resolution logic for context-aware operations.
Custom configuration
Many of the returned values (e.g. interceptors, decorators, resolvers) are lists or maps that can be extended to modify the behavior of message handling and dispatch. Lists are ordered during build time based on their configured precedence.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionOrdered batch interceptors grouped per message type.cache()Default cache used for internal stateful optimizations (e.g. handler state, snapshots).clock()Provides a central clock used throughout the system for timestamps and scheduling.Returns the provider responsible for adding correlation data to outgoing messages.Provides custom consumer configurations per message type.Provides the default consumer configuration per message type.Default response mapper used for converting handler return values into generic responses.Ordered dispatch interceptors grouped per message type.Returns the serializer used to store and retrieve documents in theDocumentStore.Internal web consumer that can forward incomingWebRequestmessages to a local HTTP server.Ordered handler decorators grouped per message type.Returns the provider used to generate or resolve application-specific identities.booleanWhether the application instance should be created automatically on first use.Special interceptor used to determine routing of dispatched messages (e.g. for multitenancy).List<ParameterResolver<? super DeserializingMessage>> Returns the assembled parameter resolvers used for injecting handler method arguments.Provides access to configuration properties (typically loaded from the environment).Dedicated cache used to store and lookup relationships between entities.Interceptor applied to scheduled messages, such as time-based commands or events.Returns the primary serializer for serializing and deserializing message payloads.Returns the serializer used for serializing and deserializing snapshots of stateful entities.Task scheduler used for asynchronous background task execution.Returns the provider used to determine the current authenticated or active user.Mapper used for converting web handler return values intoWebResponseobjects.
-
Method Details
-
serializer
Serializer serializer()Returns the primary serializer for serializing and deserializing message payloads. -
snapshotSerializer
Serializer snapshotSerializer()Returns the serializer used for serializing and deserializing snapshots of stateful entities. -
correlationDataProvider
CorrelationDataProvider correlationDataProvider()Returns the provider responsible for adding correlation data to outgoing messages. -
documentSerializer
DocumentSerializer documentSerializer()Returns the serializer used to store and retrieve documents in theDocumentStore. -
defaultConsumerConfigurations
Map<MessageType, ConsumerConfiguration> defaultConsumerConfigurations()Provides the default consumer configuration per message type. -
customConsumerConfigurations
Map<MessageType, List<ConsumerConfiguration>> customConsumerConfigurations()Provides custom consumer configurations per message type. -
parameterResolvers
List<ParameterResolver<? super DeserializingMessage>> parameterResolvers()Returns the assembled parameter resolvers used for injecting handler method arguments. -
dispatchInterceptors
Map<MessageType, List<DispatchInterceptor>> dispatchInterceptors()Ordered dispatch interceptors grouped per message type. -
handlerDecorators
Map<MessageType, List<HandlerDecorator>> handlerDecorators()Ordered handler decorators grouped per message type. -
batchInterceptors
Map<MessageType, List<BatchInterceptor>> batchInterceptors()Ordered batch interceptors grouped per message type. -
clock
DelegatingClock clock()Provides a central clock used throughout the system for timestamps and scheduling. -
messageRoutingInterceptor
DispatchInterceptor messageRoutingInterceptor()Special interceptor used to determine routing of dispatched messages (e.g. for multitenancy). -
schedulingInterceptor
SchedulingInterceptor schedulingInterceptor()Interceptor applied to scheduled messages, such as time-based commands or events. -
taskScheduler
TaskScheduler taskScheduler()Task scheduler used for asynchronous background task execution. -
forwardingWebConsumer
ForwardingWebConsumer forwardingWebConsumer()Internal web consumer that can forward incomingWebRequestmessages to a local HTTP server. Typically configured viaFluxzeroBuilder.forwardWebRequestsToLocalServer(int). -
cache
Cache cache()Default cache used for internal stateful optimizations (e.g. handler state, snapshots). -
relationshipsCache
Cache relationshipsCache()Dedicated cache used to store and lookup relationships between entities. -
defaultResponseMapper
ResponseMapper defaultResponseMapper()Default response mapper used for converting handler return values into generic responses. -
webResponseMapper
WebResponseMapper webResponseMapper()Mapper used for converting web handler return values intoWebResponseobjects. -
makeApplicationInstance
boolean makeApplicationInstance()Whether the application instance should be created automatically on first use. -
userProvider
UserProvider userProvider()Returns the provider used to determine the current authenticated or active user. -
identityProvider
IdentityProvider identityProvider()Returns the provider used to generate or resolve application-specific identities. -
propertySource
PropertySource propertySource()Provides access to configuration properties (typically loaded from the environment).
-