Uses of Class
org.springframework.modulith.events.EventExternalizationConfiguration.Router
Package
Description
API of the event publication registry abstraction.
-
Uses of EventExternalizationConfiguration.Router in org.springframework.modulith.events
Modifier and TypeMethodDescriptionEventExternalizationConfiguration.defaults
(Collection<String> packages) Creates a defaultDefaultEventExternalizationConfiguration
with the following characteristics: Only events that reside in any of the given packages and that are annotated with any supportedExternalized
annotation will be considered. Routing information is discovered from the {code Externalized} annotation and, if missing, will default to the application-local name of the event type.Registers a type-specific mapping function.Registers a new mappingFunction
replacing the old one entirely.EventExternalizationConfiguration.Router.route
(Class<T> type, Function<T, RoutingTarget> router) Registers a router function for the events of the given specific type.EventExternalizationConfiguration.Router.routeAll
(Function<Object, RoutingTarget> router) Routes all events based on the given function.EventExternalizationConfiguration.Router.routeAllByType
(Function<Class<?>, RoutingTarget> router) Routes all messages based on the event type only.Registers aBiFunction
to resolve the key for aRoutingTarget
based on the event instance.EventExternalizationConfiguration.Router.routeMapped()
Configures the routing to rather use the mapping result rather than the original event instance.Selects events to externalize by applying the givenPredicate
.EventExternalizationConfiguration.Selector.selectAndRoute
(Class<T> annotationType, BiFunction<Object, T, RoutingTarget> router) Selects events by the presence of an annotation of the given type and routes based on the given routerBiFunction
that also gets the event type to build up a completeRoutingTarget
.EventExternalizationConfiguration.Selector.selectAndRoute
(Class<T> annotationType, Function<T, String> router) Selects events by the presence of an annotation of the given type and routes based on the given routerFunction
.EventExternalizationConfiguration.Selector.selectByAnnotation
(Class<? extends Annotation> type) Selects events to be externalized by inspecting the event type for the given annotation.EventExternalizationConfiguration.Selector.selectByPackage
(Class<?> type) Selects events to externalize by the package of the given type and all sub-packages.EventExternalizationConfiguration.Selector.selectByPackage
(String basePackage) Selects events to externalize by the given base package and all sub-packages.EventExternalizationConfiguration.Selector.selectByPackagesAndFilter
(Collection<String> basePackages, Predicate<Object> filter) Selects events to externalize by the given base packages (and their sub-packages) that match the given filterPredicate
.EventExternalizationConfiguration.Selector.selectByType
(Class<?> type) Selects events to be externalized by type.EventExternalizationConfiguration.Selector.selectByType
(Predicate<Class<?>> predicate) Selects events to be externalized by the givenPredicate
.