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(Member member, 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(T message, 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–2020. All rights reserved.