Renamed validation hooks to incoming message hooks.

This commit is contained in:
akwizgran
2016-03-07 15:38:56 +00:00
parent 8960644273
commit c9276de399
5 changed files with 42 additions and 39 deletions

View File

@@ -30,14 +30,19 @@ public interface ValidationManager {
}
}
/** Sets the message validator for the given client. */
/**
* Sets the message validator for the given client.
*/
void registerMessageValidator(ClientId c, MessageValidator v);
/** Registers a hook to be called whenever a message is validated. */
void registerValidationHook(ValidationHook hook);
/**
* Sets the incoming message hook for the given client. The hook will be
* called once for each incoming message that passes validation.
*/
void registerIncomingMessageHook(ClientId c, IncomingMessageHook hook);
interface ValidationHook {
void validatingMessage(Transaction txn, Message m, ClientId c,
Metadata meta) throws DbException;
interface IncomingMessageHook {
void incomingMessage(Transaction txn, Message m, Metadata meta)
throws DbException;
}
}