Rename events.

This commit is contained in:
akwizgran
2019-06-21 14:05:51 +01:00
parent 8cbd27c011
commit 0b2c84c53b
5 changed files with 26 additions and 26 deletions

View File

@@ -7,16 +7,16 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import javax.annotation.concurrent.Immutable;
/**
* An event that is broadcast when a message is received from, or offered by, a
* contact and needs to be acknowledged.
* An event that is broadcast when one or more messages are received from, or
* offered by, a contact and need to be acknowledged.
*/
@Immutable
@NotNullByDefault
public class MessageToAckEvent extends Event {
public class MessagesToAckEvent extends Event {
private final ContactId contactId;
public MessageToAckEvent(ContactId contactId) {
public MessagesToAckEvent(ContactId contactId) {
this.contactId = contactId;
}

View File

@@ -12,17 +12,17 @@ import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
/**
* An event that is broadcast when a message is offered by a contact and needs
* to be requested.
* An event that is broadcast when one or more messages are offered by a
* contact and need to be requested.
*/
@Immutable
@NotNullByDefault
public class MessageToRequestEvent extends Event {
public class MessagesToRequestEvent extends Event {
private final ContactId contactId;
private final Consumable<Collection<MessageId>> ids;
public MessageToRequestEvent(ContactId contactId,
public MessagesToRequestEvent(ContactId contactId,
Collection<MessageId> ids) {
this.contactId = contactId;
this.ids = new Consumable<>(ids);