mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Moved validation interfaces into respective managers.
This commit is contained in:
@@ -41,7 +41,20 @@ public interface ValidationManager {
|
||||
*/
|
||||
void registerIncomingMessageHook(ClientId c, IncomingMessageHook hook);
|
||||
|
||||
interface MessageValidator {
|
||||
|
||||
/**
|
||||
* Validates the given message and returns its metadata if the message
|
||||
* is valid, or null if the message is invalid.
|
||||
*/
|
||||
Metadata validateMessage(Message m, Group g);
|
||||
}
|
||||
|
||||
interface IncomingMessageHook {
|
||||
|
||||
/**
|
||||
* Called once for each incoming message that passes validation.
|
||||
*/
|
||||
void incomingMessage(Transaction txn, Message m, Metadata meta)
|
||||
throws DbException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user