mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Rename event, only broadcast it when adding a new contact.
This commit is contained in:
@@ -3,27 +3,28 @@ package org.briarproject.bramble.api.mailbox.event;
|
||||
import org.briarproject.bramble.api.contact.ContactId;
|
||||
import org.briarproject.bramble.api.event.Event;
|
||||
import org.briarproject.bramble.api.mailbox.MailboxUpdate;
|
||||
import org.briarproject.bramble.api.mailbox.MailboxUpdateManager;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* An event that is broadcast when a mailbox update is sent to a contact.
|
||||
* An event that is broadcast when the first mailbox update is sent to a
|
||||
* newly added contact, which happens in the same transaction in which the
|
||||
* contact is added.
|
||||
* <p>
|
||||
* Note that this event is not broadcast when a mailbox is paired or
|
||||
* unpaired, although updates are sent to all contacts in those situations.
|
||||
*
|
||||
* @see MailboxPairedEvent
|
||||
* @see MailboxUnpairedEvent
|
||||
* This event is not broadcast when the first mailbox update is sent to an
|
||||
* existing contact when setting up the
|
||||
* {@link MailboxUpdateManager mailbox update client}.
|
||||
*/
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
public class MailboxUpdateSentEvent extends Event {
|
||||
public class MailboxUpdateSentToNewContactEvent extends Event {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final MailboxUpdate mailboxUpdate;
|
||||
|
||||
public MailboxUpdateSentEvent(ContactId contactId,
|
||||
public MailboxUpdateSentToNewContactEvent(ContactId contactId,
|
||||
MailboxUpdate mailboxUpdate) {
|
||||
this.contactId = contactId;
|
||||
this.mailboxUpdate = mailboxUpdate;
|
||||
Reference in New Issue
Block a user