mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Moved ConnectionDispatcher and ConnectionRegistry to plugins package.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package org.briarproject.api.plugins;
|
||||
|
||||
import org.briarproject.api.ContactId;
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.plugins.duplex.DuplexTransportConnection;
|
||||
|
||||
public interface ConnectionDispatcher {
|
||||
|
||||
void dispatchIncomingConnection(TransportId t, TransportConnectionReader r);
|
||||
|
||||
void dispatchIncomingConnection(TransportId t, DuplexTransportConnection d);
|
||||
|
||||
void dispatchOutgoingConnection(ContactId c, TransportId t,
|
||||
TransportConnectionWriter w);
|
||||
|
||||
void dispatchOutgoingConnection(ContactId c, TransportId t,
|
||||
DuplexTransportConnection d);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.briarproject.api.plugins;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.briarproject.api.ContactId;
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/**
|
||||
* Keeps track of which contacts are currently connected by which transports.
|
||||
*/
|
||||
public interface ConnectionRegistry {
|
||||
|
||||
void registerConnection(ContactId c, TransportId t);
|
||||
|
||||
void unregisterConnection(ContactId c, TransportId t);
|
||||
|
||||
Collection<ContactId> getConnectedContacts(TransportId t);
|
||||
|
||||
boolean isConnected(ContactId c);
|
||||
}
|
||||
Reference in New Issue
Block a user