public interface EventProcessingConfigurer
Modifier and Type | Interface and Description |
---|---|
static interface |
EventProcessingConfigurer.EventProcessorBuilder
Contract which defines how to build an event processor.
|
Modifier and Type | Method and Description |
---|---|
EventProcessingConfigurer |
assignHandlerInstancesMatching(String processingGroup,
int priority,
Predicate<Object> criteria)
Configures a rule to assign Event Handler beans that match the given
criteria to the Processing Group
with given name , with given priority . |
default EventProcessingConfigurer |
assignHandlerInstancesMatching(String processingGroup,
Predicate<Object> criteria)
Configures a rule to assign Event Handler beans that match the given
criteria to the Processing Group
with given name , with neutral priority (value 0). |
EventProcessingConfigurer |
assignHandlerTypesMatching(String processingGroup,
int priority,
Predicate<Class<?>> criteria)
Configures a rule to assign Event Handler beans that match the given
criteria to the Processing Group
with given name , with given priority . |
default EventProcessingConfigurer |
assignHandlerTypesMatching(String processingGroup,
Predicate<Class<?>> criteria)
Configures a rule to assign Event Handler beans that match the given
criteria to the Processing Group
with given name , with neutral priority (value 0). |
EventProcessingConfigurer |
assignProcessingGroup(Function<String,String> assignmentRule)
Defines a rule for assigning processing groups to processors if processing group to processor name mapping does
not contain the entry.
|
EventProcessingConfigurer |
assignProcessingGroup(String processingGroup,
String processorName)
Defines a mapping for assigning processing groups to processors.
|
EventProcessingConfigurer |
byDefaultAssignHandlerInstancesTo(Function<Object,String> assignmentFunction)
Registers a
Function that defines the Event Processing Group name to assign Event Handler beans to when
no other, more explicit, rule matches and no ProcessingGroup annotation is found. |
EventProcessingConfigurer |
byDefaultAssignHandlerTypesTo(Function<Class<?>,String> assignmentFunction)
Registers a
Function that defines the Event Processing Group name to assign Event Handler and Saga beans
to when no other, more explicit, rule matches and no ProcessingGroup annotation is found. |
default EventProcessingConfigurer |
byDefaultAssignTo(String processingGroup)
Registers the
processingGroup name to assign Event Handler and Saga beans to when no other, more
explicit, rule matches and no ProcessingGroup annotation is found. |
EventProcessingConfigurer |
registerDefaultErrorHandler(Function<Configuration,ErrorHandler> errorHandlerBuilder)
Registers a
Function that builds the default ErrorHandler . |
EventProcessingConfigurer |
registerDefaultHandlerInterceptor(BiFunction<Configuration,String,MessageHandlerInterceptor<? super EventMessage<?>>> interceptorBuilder)
Register the given
interceptorBuilder as a default to build a MessageHandlerInterceptor for
EventProcessor s created in this configuration. |
EventProcessingConfigurer |
registerDefaultListenerInvocationErrorHandler(Function<Configuration,ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder)
Registers a
Function that builds the default ListenerInvocationErrorHandler . |
EventProcessingConfigurer |
registerDefaultSequencingPolicy(Function<Configuration,SequencingPolicy<? super EventMessage<?>>> policyBuilder)
Registers the
SequencingPolicy created by given policyBuilder to the processing groups for which
no explicit policy is defined (using registerSequencingPolicy(String, Function) ). |
EventProcessingConfigurer |
registerErrorHandler(String eventProcessorName,
Function<Configuration,ErrorHandler> errorHandlerBuilder)
|
EventProcessingConfigurer |
registerEventHandler(Function<Configuration,Object> eventHandlerBuilder)
Registers a
Function that builds an Event Handler instance. |
EventProcessingConfigurer |
registerEventProcessor(String name,
EventProcessingConfigurer.EventProcessorBuilder eventProcessorBuilder)
Registers an
EventProcessingConfigurer.EventProcessorBuilder for the given processor name . |
EventProcessingConfigurer |
registerEventProcessorFactory(EventProcessingConfigurer.EventProcessorBuilder eventProcessorBuilder)
Registers a factory that builds the default
EventProcessor . |
EventProcessingConfigurer |
registerHandlerInterceptor(String processorName,
Function<Configuration,MessageHandlerInterceptor<? super EventMessage<?>>> interceptorBuilder)
Register the given
interceptorBuilder to build a MessageHandlerInterceptor for the
EventProcessor with given processorName . |
EventProcessingConfigurer |
registerListenerInvocationErrorHandler(String processingGroup,
Function<Configuration,ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder)
|
default EventProcessingConfigurer |
registerMessageMonitor(String eventProcessorName,
Function<Configuration,MessageMonitor<Message<?>>> messageMonitorBuilder)
|
EventProcessingConfigurer |
registerMessageMonitorFactory(String eventProcessorName,
MessageMonitorFactory messageMonitorFactory)
|
EventProcessingConfigurer |
registerRollbackConfiguration(String name,
Function<Configuration,RollbackConfiguration> rollbackConfigurationBuilder)
|
default <T> EventProcessingConfigurer |
registerSaga(Class<T> sagaType)
Registers a Saga with default configuration within this Configurer.
|
<T> EventProcessingConfigurer |
registerSaga(Class<T> sagaType,
Consumer<SagaConfigurer<T>> sagaConfigurer)
Registers a Saga, allowing specific configuration to use for this Saga type.
|
EventProcessingConfigurer |
registerSagaStore(Function<Configuration,SagaStore> sagaStoreBuilder)
|
EventProcessingConfigurer |
registerSequencingPolicy(String processingGroup,
Function<Configuration,SequencingPolicy<? super EventMessage<?>>> policyBuilder)
Registers the
SequencingPolicy created by the given policyBuilder to the processing group with
given processingGroup . |
default EventProcessingConfigurer |
registerSubscribingEventProcessor(String name)
Registers a
SubscribingEventProcessor with given name within this
Configurer. |
EventProcessingConfigurer |
registerSubscribingEventProcessor(String name,
Function<Configuration,SubscribableMessageSource<? extends EventMessage<?>>> messageSource)
|
EventProcessingConfigurer |
registerTokenStore(Function<Configuration,TokenStore> tokenStore)
Register a
Function that builds a TokenStore to use as the default in case no explicit token
store was configured for a processor. |
EventProcessingConfigurer |
registerTokenStore(String processorName,
Function<Configuration,TokenStore> tokenStoreBuilder)
|
default EventProcessingConfigurer |
registerTrackingEventProcessor(String name)
Registers a
TrackingEventProcessor with given name within this
Configurer. |
default EventProcessingConfigurer |
registerTrackingEventProcessor(String name,
Function<Configuration,StreamableMessageSource<TrackedEventMessage<?>>> source)
|
EventProcessingConfigurer |
registerTrackingEventProcessor(String name,
Function<Configuration,StreamableMessageSource<TrackedEventMessage<?>>> source,
Function<Configuration,TrackingEventProcessorConfiguration> processorConfiguration)
Registers a
TrackingEventProcessor with given name , source and processorConfiguration within this Configurer. |
EventProcessingConfigurer |
registerTransactionManager(String name,
Function<Configuration,TransactionManager> transactionManagerBuilder)
|
EventProcessingConfigurer |
usingSubscribingEventProcessors()
Defaults Event Processors builders to use
SubscribingEventProcessor . |
default <T> EventProcessingConfigurer registerSaga(Class<T> sagaType)
T
- the type of SagasagaType
- the type of SagaEventProcessingConfigurer
instance, for fluent interfacing<T> EventProcessingConfigurer registerSaga(Class<T> sagaType, Consumer<SagaConfigurer<T>> sagaConfigurer)
T
- The type of Saga to configuresagaType
- The type of Saga to configuresagaConfigurer
- a function providing modifications on top of the defaul configurationEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerSagaStore(Function<Configuration,SagaStore> sagaStoreBuilder)
sagaStoreBuilder
- a Function
that builds a SagaStore
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerEventHandler(Function<Configuration,Object> eventHandlerBuilder)
Function
that builds an Event Handler instance.eventHandlerBuilder
- a Function
that builds an Event Handler instanceEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerDefaultListenerInvocationErrorHandler(Function<Configuration,ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder)
Function
that builds the default ListenerInvocationErrorHandler
.
Defaults to a LoggingErrorHandler
.listenerInvocationErrorHandlerBuilder
- a Function
that builds the default
ListenerInvocationErrorHandler
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerListenerInvocationErrorHandler(String processingGroup, Function<Configuration,ListenerInvocationErrorHandler> listenerInvocationErrorHandlerBuilder)
processingGroup
- a String
specifying the name of a processing grouplistenerInvocationErrorHandlerBuilder
- a Function
that builds ListenerInvocationErrorHandler
EventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer registerTrackingEventProcessor(String name)
TrackingEventProcessor
with given name
within this
Configurer.name
- a String
specifying the name of the TrackingEventProcessor
being registeredEventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer registerTrackingEventProcessor(String name, Function<Configuration,StreamableMessageSource<TrackedEventMessage<?>>> source)
name
- a String
specifying the name of the TrackingEventProcessor
being registeredsource
- a Function
that builds a StreamableMessageSource
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerTrackingEventProcessor(String name, Function<Configuration,StreamableMessageSource<TrackedEventMessage<?>>> source, Function<Configuration,TrackingEventProcessorConfiguration> processorConfiguration)
TrackingEventProcessor
with given name
, source
and processorConfiguration
within this Configurer.name
- a String
specifying the name of the TrackingEventProcessor
being registeredsource
- a Function
that builds StreamableMessageSource
processorConfiguration
- a Function
that builds a TrackingEventProcessorConfiguration
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerEventProcessorFactory(EventProcessingConfigurer.EventProcessorBuilder eventProcessorBuilder)
EventProcessor
. This is the EventProcessingConfigurer.EventProcessorBuilder
to
be used when there is no specific builder for given processor name.eventProcessorBuilder
- a Function
that builds an EventProcessor
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerEventProcessor(String name, EventProcessingConfigurer.EventProcessorBuilder eventProcessorBuilder)
EventProcessingConfigurer.EventProcessorBuilder
for the given processor name
.name
- a String
specifying the name of the EventProcessor
being registeredeventProcessorBuilder
- a Function
that builds an EventProcessor
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerTokenStore(String processorName, Function<Configuration,TokenStore> tokenStoreBuilder)
processorName
- a String
specifying the name of a event processortokenStoreBuilder
- a Function
that builds a TokenStore
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerTokenStore(Function<Configuration,TokenStore> tokenStore)
Function
that builds a TokenStore
to use as the default in case no explicit token
store was configured for a processor.tokenStore
- a Function
that builds a TokenStore
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer usingSubscribingEventProcessors()
SubscribingEventProcessor
.EventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer registerSubscribingEventProcessor(String name)
SubscribingEventProcessor
with given name
within this
Configurer.name
- a String
specyfing the name of the SubscribingEventProcessor
being registeredEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerSubscribingEventProcessor(String name, Function<Configuration,SubscribableMessageSource<? extends EventMessage<?>>> messageSource)
name
- a String
specyfing the name of the SubscribingEventProcessor
being registeredmessageSource
- a Function
that builds a SubscribableMessageSource
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerDefaultErrorHandler(Function<Configuration,ErrorHandler> errorHandlerBuilder)
errorHandlerBuilder
- a Function
that builds an ErrorHandler
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerErrorHandler(String eventProcessorName, Function<Configuration,ErrorHandler> errorHandlerBuilder)
eventProcessorName
- a String
specifying the name of an EventProcessor
errorHandlerBuilder
- a Function
that builds an ErrorHandler
EventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer byDefaultAssignTo(String processingGroup)
processingGroup
name to assign Event Handler and Saga beans to when no other, more
explicit, rule matches and no ProcessingGroup
annotation is found.processingGroup
- a String
specifying the name of a processing groupEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer byDefaultAssignHandlerInstancesTo(Function<Object,String> assignmentFunction)
Function
that defines the Event Processing Group name to assign Event Handler beans to when
no other, more explicit, rule matches and no ProcessingGroup
annotation is found.assignmentFunction
- a Function
that returns the Processing Group for each Event Handler beanEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer byDefaultAssignHandlerTypesTo(Function<Class<?>,String> assignmentFunction)
Function
that defines the Event Processing Group name to assign Event Handler and Saga beans
to when no other, more explicit, rule matches and no ProcessingGroup
annotation is found.assignmentFunction
- a Function
that returns the Processing Group for each Event Handler or Saga
beanEventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer assignHandlerInstancesMatching(String processingGroup, Predicate<Object> criteria)
criteria
to the Processing Group
with given name
, with neutral priority (value 0).
Note that, when beans match multiple criteria for different Processing Groups with equal priority, the outcome is undefined.
processingGroup
- a String
specifying the name of a processing group to assign matching Event
Handlers tocriteria
- a Predicate
defining the criteria for an Event Handler to matchEventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer assignHandlerTypesMatching(String processingGroup, Predicate<Class<?>> criteria)
criteria
to the Processing Group
with given name
, with neutral priority (value 0).
Note that, when beans match multiple criteria for different Processing Groups with equal priority, the outcome is undefined.
processingGroup
- a String
specifying the name of a processing group to assign matching Event
Handlers or Sagas tocriteria
- a Predicate
defining the criteria for an Event Handler or Saga to matchEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer assignHandlerInstancesMatching(String processingGroup, int priority, Predicate<Object> criteria)
criteria
to the Processing Group
with given name
, with given priority
. Rules with higher value of priority
take precedence
over those with a lower value.
Note that, when beans match multiple criteria for different processing groups with equal priority, the outcome is undefined.
processingGroup
- a String
specifying the name of a processing group to assign matching Event
Handlers topriority
- The priority for this rulecriteria
- a Predicate
defining the criteria for an Event Handler to matchEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer assignHandlerTypesMatching(String processingGroup, int priority, Predicate<Class<?>> criteria)
criteria
to the Processing Group
with given name
, with given priority
. Rules with higher value of priority
take precedence
over those with a lower value.
Note that, when beans match multiple criteria for different processing groups with equal priority, the outcome is undefined.
processingGroup
- a String
specifying the name of the Processing Group to assign matching Event
Handlers or Sagas topriority
- an int
specifying the priority of this rulecriteria
- a Predicate
defining the criteria for an Event Handler or Saga to matchEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer assignProcessingGroup(String processingGroup, String processorName)
processingGroup
- a String
specifying the processing group to be assignedprocessorName
- a String
specifying the processor name to assign the group toEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer assignProcessingGroup(Function<String,String> assignmentRule)
assignmentRule
- a Function
which takes a processing group and returns a processor nameEventProcessingConfigurer
instance, for fluent interfacingassignProcessingGroup(String, String)
EventProcessingConfigurer registerHandlerInterceptor(String processorName, Function<Configuration,MessageHandlerInterceptor<? super EventMessage<?>>> interceptorBuilder)
interceptorBuilder
to build a MessageHandlerInterceptor
for the
EventProcessor
with given processorName
.
The interceptorBuilder
may return null
, in which case the return value is ignored.
processorName
- a String
specyfing the name of the processor to register the
MessageHandlerInterceptor
oninterceptorBuilder
- a Function
providing the MessageHandlerInterceptor
to register, or
null
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerDefaultHandlerInterceptor(BiFunction<Configuration,String,MessageHandlerInterceptor<? super EventMessage<?>>> interceptorBuilder)
interceptorBuilder
as a default to build a MessageHandlerInterceptor
for
EventProcessor
s created in this configuration.
The interceptorBuilder
is invoked once for each processor created, and may return null
, in which
case the return value is ignored.
interceptorBuilder
- a builder Function
that provides a MessageHandlerInterceptor
for each
available processorEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerSequencingPolicy(String processingGroup, Function<Configuration,SequencingPolicy<? super EventMessage<?>>> policyBuilder)
SequencingPolicy
created by the given policyBuilder
to the processing group with
given processingGroup
. Any previously configured policy for the same name will be overwritten.processingGroup
- a String
specifying the name of the processing group to assign the
SequencingPolicy
forpolicyBuilder
- a builder Function
to create the SequencingPolicy
to useEventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerDefaultSequencingPolicy(Function<Configuration,SequencingPolicy<? super EventMessage<?>>> policyBuilder)
SequencingPolicy
created by given policyBuilder
to the processing groups for which
no explicit policy is defined (using registerSequencingPolicy(String, Function)
).
Defaults to a SequentialPerAggregatePolicy
.
policyBuilder
- a builder Function
to create the SequencingPolicy
to useEventProcessingConfigurer
instance, for fluent interfacingdefault EventProcessingConfigurer registerMessageMonitor(String eventProcessorName, Function<Configuration,MessageMonitor<Message<?>>> messageMonitorBuilder)
eventProcessorName
- a String
specifying the name of an EventProcessor
messageMonitorBuilder
- a builder Function
to create a MessageMonitor
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerMessageMonitorFactory(String eventProcessorName, MessageMonitorFactory messageMonitorFactory)
eventProcessorName
- a String
specifying the name of an EventProcessor
messageMonitorFactory
- a MessageMonitorFactory
used to create a MessageMonitor
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerRollbackConfiguration(String name, Function<Configuration,RollbackConfiguration> rollbackConfigurationBuilder)
Function
that builds the RollbackConfiguration
for given processor name
.
Defaults to a RollbackConfigurationType.ANY_THROWABLE
name
- a String
specifying the name of an EventProcessor
rollbackConfigurationBuilder
- a Function
that builds a RollbackConfiguration
EventProcessingConfigurer
instance, for fluent interfacingEventProcessingConfigurer registerTransactionManager(String name, Function<Configuration,TransactionManager> transactionManagerBuilder)
name
- a String
specifying the name of an EventProcessor
transactionManagerBuilder
- a Function
that builds a TransactionManager
EventProcessingConfigurer
instance, for fluent interfacingCopyright © 2010–2018. All rights reserved.