Interface MatsSocketServer.ReplyAdapter<I,MR,R>

Enclosing interface:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface MatsSocketServer.ReplyAdapter<I,MR,R>
Used to transform the reply message from the Mats endpoint to the reply for the MatsSocket endpoint, and decide whether to resolve or reject the waiting Client-side Promise (i.e. a secondary authorization evaluation, now that the Mats result is present) - this should only be pure Java DTO transformation code!

Note: This should preferentially only be pure and quick Java code, without much database access or lengthy computations - such things should happen in the Mats stages. It should preferably just decide whether to resolve or reject, and adapt the Mats reply DTO to the MatsSocket endpoint's expected reply DTO.

Note: It is imperative that this does not perform any state-changes to the system - it should be utterly idempotent, i.e. invoking it a hundred times with the same input should yield the same result. (Note: Logging is never considered state changing!)