Uses of Class
org.springframework.modulith.events.EventExternalizationConfiguration.Router
Packages that use EventExternalizationConfiguration.Router
Package
Description
API of the event publication registry abstraction.
-
Uses of EventExternalizationConfiguration.Router in org.springframework.modulith.events
Methods in org.springframework.modulith.events that return EventExternalizationConfiguration.RouterModifier and TypeMethodDescriptionCreates a defaultDefaultEventExternalizationConfigurationwith the following characteristics: Only events that reside in any of the given packages and that are annotated with any supportedExternalizedannotation 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.EventExternalizationConfiguration.defaults(Collection<String> packages) Creates a defaultDefaultEventExternalizationConfigurationwith the following characteristics: Only events that reside in any of the given packages and that are annotated with any supportedExternalizedannotation 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.EventExternalizationConfiguration.Router.headers(Class<T> type, Function<T, Map<String, Object>> extractor) Registers the given type-specific function to extract headers from the events to be externalized.Registers the given function to extract headers from the events to be externalized.Registers a type-specific mapping function.Registers a new mappingFunctionreplacing 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 aBiFunctionto resolve the key for aRoutingTargetbased 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 routerBiFunctionthat 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.