Introduce a MessageContext class for more flexibility

This change will allow to pass message dependencies from the client
validators to the ValidationManager.
This commit is contained in:
Torsten Grote
2016-05-17 18:20:24 -03:00
committed by str4d
parent 8c2fd905a1
commit 3f2b85ac0d
18 changed files with 209 additions and 72 deletions

View File

@@ -44,10 +44,11 @@ public interface ValidationManager {
interface MessageValidator {
/**
* Validates the given message and returns its metadata if the message
* is valid, or null if the message is invalid.
* Validates the given message and returns its metadata and
* dependencies.
*/
Metadata validateMessage(Message m, Group g);
MessageContext validateMessage(Message m, Group g)
throws InvalidMessageException;
}
interface IncomingMessageHook {