T
- the implementation T
of the Message
being filtered.public class ForwardMatchingInstances<T extends Message<?>> extends Object implements ForwardingMode<T>
T
if the routing key of the message matches that of the entity. Essentially,
this means that events are only forwarded if the Message mentions the identifier of the entity instance.Constructor and Description |
---|
ForwardMatchingInstances() |
Modifier and Type | Method and Description |
---|---|
<E> Stream<E> |
filterCandidates(T message,
Stream<E> candidates)
|
void |
initialize(Member member,
EntityModel childEntity)
Initializes an instance of a
ForwardingMode . |
public void initialize(@Nonnull Member member, @Nonnull EntityModel childEntity)
ForwardingMode
ForwardingMode
.initialize
in interface ForwardingMode<T extends Message<?>>
member
- The Member
to apply a ForwardingMode on. Provided to be able to
check for annotations attributes which might assist in the forwarding process.childEntity
- A EntityModel
constructed from the given field
.public <E> Stream<E> filterCandidates(@Nonnull T message, @Nonnull Stream<E> candidates)
ForwardingMode
filterCandidates
in interface ForwardingMode<T extends Message<?>>
E
- The type of the candidates
message
- The message of type T
to be forwarded.candidates
- The Stream
of candidates to filter.Stream
of candidates
which will handle the message
.Copyright © 2010–2023. All rights reserved.