M
- the type of messages to get IDs fromC
- the type of message contextR
- the type of the route function result@FunctionalInterface
public interface Route<M extends com.google.protobuf.Message,C extends com.google.protobuf.Message,R>
extends java.util.function.BiFunction<M,C,R>, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
R |
apply(M message,
C context)
Obtains entity ID(s) from the passed message and its context.
|
R apply(M message, C context)
apply
in interface java.util.function.BiFunction<M extends com.google.protobuf.Message,C extends com.google.protobuf.Message,R>
message
- the event or a command messagecontext
- the context of the messageBiFunction
for more clarity in
Javadoc references. Without overriding it will be #apply(Object, Object)
which may be confusing in the context of event routing.