mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Separated event infrastructure from DB.
This commit is contained in:
@@ -13,7 +13,6 @@ import org.briarproject.api.Settings;
|
||||
import org.briarproject.api.TransportConfig;
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.TransportProperties;
|
||||
import org.briarproject.api.event.EventListener;
|
||||
import org.briarproject.api.messaging.Ack;
|
||||
import org.briarproject.api.messaging.Group;
|
||||
import org.briarproject.api.messaging.GroupId;
|
||||
@@ -43,12 +42,6 @@ public interface DatabaseComponent {
|
||||
/** Waits for any open transactions to finish and closes the database. */
|
||||
void close() throws DbException, IOException;
|
||||
|
||||
/** Adds a listener to be notified when database events occur. */
|
||||
void addListener(EventListener l);
|
||||
|
||||
/** Removes a listener. */
|
||||
void removeListener(EventListener l);
|
||||
|
||||
/**
|
||||
* Stores a contact associated with the given local and remote pseudonyms,
|
||||
* and returns an ID for the contact.
|
||||
|
||||
13
briar-api/src/org/briarproject/api/event/EventBus.java
Normal file
13
briar-api/src/org/briarproject/api/event/EventBus.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
public interface EventBus {
|
||||
|
||||
/** Adds a listener to be notified when events occur. */
|
||||
void addListener(EventListener l);
|
||||
|
||||
/** Removes a listener. */
|
||||
void removeListener(EventListener l);
|
||||
|
||||
/** Notifies all listeners of an event. */
|
||||
void broadcast(Event e);
|
||||
}
|
||||
Reference in New Issue
Block a user