Class BrokerRouting
java.lang.Object
org.springframework.modulith.events.support.BrokerRouting
- Direct Known Subclasses:
BrokerRouting.SpelBrokerRouting
A
BrokerRouting supports RoutingTarget instances that contain values matching the format
$target::$key for which both the target and key can be a SpEL expression.- Since:
- 1.1
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classABrokerRoutingthat evaluates aRoutingTarget's key as SpEL expression. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionResolves the routing key against the given event.Deprecated.Returns the actual routing target for the given event.static BrokerRoutingof(RoutingTarget target, EvaluationContext context)
-
Field Details
-
target
-
-
Method Details
-
of
- Parameters:
target- must not be null.context- must not be null.- Returns:
- will never be null.
-
getTarget
Deprecated.since 1.3, callgetTarget(Object)instead.Returns the actual routing target.- Returns:
- will never be null.
-
getTarget
Returns the actual routing target for the given event.- Parameters:
event- must not be null.- Returns:
- will never be null.
- Since:
- 1.3
-
getKey
Resolves the routing key against the given event. In case the originalRoutingTargetcontained an expression, the event will be used as root object to evaluate that expression.- Parameters:
event- must not be null.- Returns:
- can be null.
-
getTarget(Object)instead.