Files
briar/briar-api/src/org/briarproject/api/event/MessageValidatedEvent.java
Torsten Grote f44cb5ff94 Add an IntroductionManager and Validator
This Introduction BSP Client uses its own group to communicate with
existing contacts. It uses four types of messages to facilitate
introductions: the introduction, the response, the ack and the abort.

The protocol logic is encapsulated in two protocol engines, one for the
introducer and one for the introducee. The introduction client keeps the
local state for each engine, hands messages over to the engines and
processes the result and state changes they return.
2016-03-30 13:36:14 -03:00

40 lines
815 B
Java

package org.briarproject.api.event;
import org.briarproject.api.db.Metadata;
import org.briarproject.api.sync.ClientId;
import org.briarproject.api.sync.Message;
/**
* An event that is broadcast when a message has passed or failed validation.
*/
public class MessageValidatedEvent extends Event {
private final Message message;
private final ClientId clientId;
private final boolean local, valid;
public MessageValidatedEvent(Message message, ClientId clientId,
boolean local, boolean valid) {
this.message = message;
this.clientId = clientId;
this.local = local;
this.valid = valid;
}
public Message getMessage() {
return message;
}
public ClientId getClientId() {
return clientId;
}
public boolean isLocal() {
return local;
}
public boolean isValid() {
return valid;
}
}