mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Update javadoc.
This commit is contained in:
@@ -24,14 +24,6 @@ public interface ConnectionRegistry {
|
|||||||
/**
|
/**
|
||||||
* Registers a connection with the given contact over the given transport.
|
* Registers a connection with the given contact over the given transport.
|
||||||
* <p>
|
* <p>
|
||||||
* If the registry has any connections with the same contact and a
|
|
||||||
* {@link PluginConfig#getTransportPreferences() worse} transport, those
|
|
||||||
* connections will be
|
|
||||||
* {@link InterruptibleConnection#interruptOutgoingSession() interrupted}.
|
|
||||||
* <p>
|
|
||||||
* If the registry has any connections with the same contact and a better
|
|
||||||
* transport, the given connection will be interrupted.
|
|
||||||
* <p>
|
|
||||||
* Broadcasts {@link ConnectionOpenedEvent}. Also broadcasts
|
* Broadcasts {@link ConnectionOpenedEvent}. Also broadcasts
|
||||||
* {@link ContactConnectedEvent} if this is the only connection with the
|
* {@link ContactConnectedEvent} if this is the only connection with the
|
||||||
* contact.
|
* contact.
|
||||||
@@ -54,12 +46,19 @@ public interface ConnectionRegistry {
|
|||||||
* registered via {@link #registerConnection(ContactId, TransportId,
|
* registered via {@link #registerConnection(ContactId, TransportId,
|
||||||
* InterruptibleConnection, boolean)}.
|
* InterruptibleConnection, boolean)}.
|
||||||
* <p>
|
* <p>
|
||||||
* If the registry has any connections with the same contact and transport
|
* If the registry has any "better" connections with the given contact, the
|
||||||
* and a lower {@link Priority priority}, those connections will be
|
* given connection will be interrupted. If the registry has any "worse"
|
||||||
* {@link InterruptibleConnection#interruptOutgoingSession() interrupted}.
|
* connections with the given contact, those connections will be
|
||||||
|
* interrupted.
|
||||||
* <p>
|
* <p>
|
||||||
* If the registry has any connections with the same contact and transport
|
* Connection A is considered "better" than connection B if both
|
||||||
* and a higher priority, the given connection will be interrupted.
|
* connections have had their priorities set, and either A's transport is
|
||||||
|
* {@link PluginConfig#getTransportPreferences() preferred} to B's, or
|
||||||
|
* they use the same transport and A has higher {@link Priority priority}
|
||||||
|
* than B.
|
||||||
|
* <p>
|
||||||
|
* For backward compatibility, connections without priorities are not
|
||||||
|
* considered better or worse than other connections.
|
||||||
*/
|
*/
|
||||||
void setPriority(ContactId c, TransportId t, InterruptibleConnection conn,
|
void setPriority(ContactId c, TransportId t, InterruptibleConnection conn,
|
||||||
Priority priority);
|
Priority priority);
|
||||||
|
|||||||
Reference in New Issue
Block a user