mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
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.
40 lines
815 B
Java
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;
|
|
}
|
|
}
|