Interface ReactorDispatchInterceptorRegistry
- All Superinterfaces:
DescribableComponent
- All Known Implementing Classes:
DefaultReactorDispatchInterceptorRegistry
ReactorMessageDispatchInterceptors for the Reactor extension.
Provides operations to register generic Message, CommandMessage-specific,
EventMessage-specific, and QueryMessage-specific ReactorMessageDispatchInterceptors.
Registered interceptors can be retrieved through
commandInterceptors(Configuration, Class, String),
eventInterceptors(Configuration, Class, String), and
queryInterceptors(Configuration, Class, String).
Generic Message interceptors registered via
registerInterceptor(ComponentBuilder) or
registerInterceptor(ReactorDispatchInterceptorFactory)
are automatically applied to all message types.
This registry follows the same pattern as
DispatchInterceptorRegistry but is
specific to reactor-based interceptors.
- Since:
- 5.1.0
- Author:
- Theo Emanuelsson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncommandInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forCommandMessagesfor a specificcomponentTypeandcomponentName.eventInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forEventMessagesfor a specificcomponentTypeandcomponentName.queryInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forQueryMessagesfor a specificcomponentTypeandcomponentName.registerCommandInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super CommandMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor aCommandMessage-specificReactorMessageDispatchInterceptor.registerCommandInterceptor(ReactorDispatchInterceptorFactory<? super CommandMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor aCommandMessage-specificReactorMessageDispatchInterceptor.registerEventInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super EventMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor anEventMessage-specificReactorMessageDispatchInterceptor.registerEventInterceptor(ReactorDispatchInterceptorFactory<? super EventMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor anEventMessage-specificReactorMessageDispatchInterceptor.registerInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<Message>> interceptorBuilder) registerInterceptor(ReactorDispatchInterceptorFactory<Message> interceptorFactory) Registers the given component-awareinterceptorFactoryfor a genericMessageReactorMessageDispatchInterceptor.registerQueryInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super QueryMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor aQueryMessage-specificReactorMessageDispatchInterceptor.registerQueryInterceptor(ReactorDispatchInterceptorFactory<? super QueryMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor aQueryMessage-specificReactorMessageDispatchInterceptor.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeTo
-
Method Details
-
registerInterceptor
ReactorDispatchInterceptorRegistry registerInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<Message>> interceptorBuilder) Registers the giveninterceptorBuilderfor a genericMessageReactorMessageDispatchInterceptor.Registering an interceptor per a
ComponentBuilderensures the interceptor is only built once.- Parameters:
interceptorBuilder- the genericMessageReactorMessageDispatchInterceptorbuilder to register- Returns:
- this registry, for fluent interfacing
-
registerInterceptor
ReactorDispatchInterceptorRegistry registerInterceptor(ReactorDispatchInterceptorFactory<Message> interceptorFactory) Registers the given component-awareinterceptorFactoryfor a genericMessageReactorMessageDispatchInterceptor.The factory will receive the component type and name when the interceptor is retrieved allowing for component-specific customization of the interceptor. Registering an interceptor per a
ReactorDispatchInterceptorFactoryenforces construction of the interceptor for every invocation of the factory, ensuring uniqueness per given type and name. If the interceptor will be identical regardless of the given type or name, please useregisterInterceptor(ComponentBuilder)instead.- Parameters:
interceptorFactory- the genericMessageReactorMessageDispatchInterceptorfactory to register- Returns:
- this registry, for fluent interfacing
-
registerCommandInterceptor
ReactorDispatchInterceptorRegistry registerCommandInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super CommandMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor aCommandMessage-specificReactorMessageDispatchInterceptor.Registering an interceptor per a
ComponentBuilderensures the interceptor is only built once.- Parameters:
interceptorBuilder- theCommandMessage-specificReactorMessageDispatchInterceptorbuilder to register- Returns:
- this registry, for fluent interfacing
-
registerCommandInterceptor
ReactorDispatchInterceptorRegistry registerCommandInterceptor(ReactorDispatchInterceptorFactory<? super CommandMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor aCommandMessage-specificReactorMessageDispatchInterceptor.The factory will receive the component type and name when the interceptor is retrieved allowing for component-specific customization of the interceptor. Registering an interceptor per a
ReactorDispatchInterceptorFactoryenforces construction of the interceptor for every invocation of the factory, ensuring uniqueness per given type and name. If the interceptor will be identical regardless of the given type or name, please useregisterCommandInterceptor(ComponentBuilder)instead.- Parameters:
interceptorFactory- theCommandMessage-specificReactorMessageDispatchInterceptorfactory to register- Returns:
- this registry, for fluent interfacing
-
registerEventInterceptor
ReactorDispatchInterceptorRegistry registerEventInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super EventMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor anEventMessage-specificReactorMessageDispatchInterceptor.Registering an interceptor per a
ComponentBuilderensures the interceptor is only built once.- Parameters:
interceptorBuilder- theEventMessage-specificReactorMessageDispatchInterceptorbuilder to register- Returns:
- this registry, for fluent interfacing
-
registerEventInterceptor
ReactorDispatchInterceptorRegistry registerEventInterceptor(ReactorDispatchInterceptorFactory<? super EventMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor anEventMessage-specificReactorMessageDispatchInterceptor.The factory will receive the component type and name when the interceptor is retrieved allowing for component-specific customization of the interceptor. Registering an interceptor per a
ReactorDispatchInterceptorFactoryenforces construction of the interceptor for every invocation of the factory, ensuring uniqueness per given type and name. If the interceptor will be identical regardless of the given type or name, please useregisterEventInterceptor(ComponentBuilder)instead.- Parameters:
interceptorFactory- theEventMessage-specificReactorMessageDispatchInterceptorfactory to register- Returns:
- this registry, for fluent interfacing
-
registerQueryInterceptor
ReactorDispatchInterceptorRegistry registerQueryInterceptor(ComponentBuilder<ReactorMessageDispatchInterceptor<? super QueryMessage>> interceptorBuilder) Registers the giveninterceptorBuilderfor aQueryMessage-specificReactorMessageDispatchInterceptor.Registering an interceptor per a
ComponentBuilderensures the interceptor is only built once.- Parameters:
interceptorBuilder- theQueryMessage-specificReactorMessageDispatchInterceptorbuilder to register- Returns:
- this registry, for fluent interfacing
-
registerQueryInterceptor
ReactorDispatchInterceptorRegistry registerQueryInterceptor(ReactorDispatchInterceptorFactory<? super QueryMessage> interceptorFactory) Registers the given component-awareinterceptorFactoryfor aQueryMessage-specificReactorMessageDispatchInterceptor.The factory will receive the component type and name when the interceptor is retrieved allowing for component-specific customization of the interceptor. Registering an interceptor per a
ReactorDispatchInterceptorFactoryenforces construction of the interceptor for every invocation of the factory, ensuring uniqueness per given type and name. If the interceptor will be identical regardless of the given type or name, please useregisterQueryInterceptor(ComponentBuilder)instead.- Parameters:
interceptorFactory- theQueryMessage-specificReactorMessageDispatchInterceptorfactory to register- Returns:
- this registry, for fluent interfacing
-
commandInterceptors
List<ReactorMessageDispatchInterceptor<? super CommandMessage>> commandInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forCommandMessagesfor a specificcomponentTypeandcomponentName.- Parameters:
config- the configuration to build allCommandMessage-specificReactorMessageDispatchInterceptorswithcomponentType- the type of the component being interceptedcomponentName- the name of the component being intercepted- Returns:
- the list of command dispatch interceptors
-
eventInterceptors
List<ReactorMessageDispatchInterceptor<? super EventMessage>> eventInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forEventMessagesfor a specificcomponentTypeandcomponentName.- Parameters:
config- the configuration to build allEventMessage-specificReactorMessageDispatchInterceptorswithcomponentType- the type of the component being interceptedcomponentName- the name of the component being intercepted- Returns:
- the list of event dispatch interceptors
-
queryInterceptors
List<ReactorMessageDispatchInterceptor<? super QueryMessage>> queryInterceptors(Configuration config, Class<?> componentType, @Nullable String componentName) Returns the list ofReactorMessageDispatchInterceptorsregistered forQueryMessagesfor a specificcomponentTypeandcomponentName.- Parameters:
config- the configuration to build allQueryMessage-specificReactorMessageDispatchInterceptorswithcomponentType- the type of the component being interceptedcomponentName- the name of the component being intercepted- Returns:
- the list of query dispatch interceptors
-