Interface DispatchInterceptorFactory<M extends Message>
- Type Parameters:
M- the type ofMessagethe resultingMessageDispatchInterceptorwill intercept
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for building a
MessageDispatchInterceptor for a specific component type and component
name.
This interface allows MessageDispatchInterceptors to be constructed with knowledge of the component they will
intercept, allowing for fine-grained control on how or when to construct an interceptor.
- Since:
- 5.0.3
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescription@Nullable MessageDispatchInterceptor<? super M> build(@NonNull Configuration config, @NonNull Class<?> componentType, @Nullable String componentName) Builds aMessageDispatchInterceptorfor the specified component.
-
Method Details
-
build
@Nullable MessageDispatchInterceptor<? super M> build(@NonNull Configuration config, @NonNull Class<?> componentType, @Nullable String componentName) Builds aMessageDispatchInterceptorfor the specified component.- Parameters:
config- theConfigurationfrom which other components can be retrieved during constructioncomponentType- the type of the component to build a dispatch interceptor forcomponentName- the name of the component to build a dispatch interceptor for- Returns:
- a
MessageDispatchInterceptorinstance configured for the specified component ornullwhen no interceptor is required for the givencomponentTypeandcomponentNamecombination
-