mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Moved callback initialisation from start() to constructor so it can be
accessed outside the lock.
This commit is contained in:
@@ -11,6 +11,11 @@ public interface TransportPlugin {
|
||||
/** Returns the plugin's transport identifier. */
|
||||
TransportId getId();
|
||||
|
||||
/** Starts the plugin. */
|
||||
void start(Map<String, String> localProperties,
|
||||
Map<ContactId, Map<String, String>> remoteProperties,
|
||||
Map<String, String> config) throws IOException;
|
||||
|
||||
/**
|
||||
* Stops the plugin. No further connections will be passed to the callback
|
||||
* after this method has returned.
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package net.sf.briar.api.transport.batch;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.transport.TransportPlugin;
|
||||
|
||||
@@ -12,15 +9,6 @@ import net.sf.briar.api.transport.TransportPlugin;
|
||||
*/
|
||||
public interface BatchTransportPlugin extends TransportPlugin {
|
||||
|
||||
/**
|
||||
* Starts the plugin. Any connections that are later initiated by contacts
|
||||
* or established through polling will be passed to the given callback.
|
||||
*/
|
||||
void start(Map<String, String> localProperties,
|
||||
Map<ContactId, Map<String, String>> remoteProperties,
|
||||
Map<String, String> config, BatchTransportCallback c)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Attempts to create and return a BatchTransportReader for the given
|
||||
* contact using the current transport and configuration properties.
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package net.sf.briar.api.transport.stream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.transport.TransportPlugin;
|
||||
|
||||
@@ -12,15 +9,6 @@ import net.sf.briar.api.transport.TransportPlugin;
|
||||
*/
|
||||
public interface StreamTransportPlugin extends TransportPlugin {
|
||||
|
||||
/**
|
||||
* Starts the plugin. Any connections that are later initiated by contacts
|
||||
* or established through polling will be passed to the given callback.
|
||||
*/
|
||||
void start(Map<String, String> localProperties,
|
||||
Map<ContactId, Map<String, String>> remoteProperties,
|
||||
Map<String, String> config, StreamTransportCallback c)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Attempts to create and return a StreamTransportConnection to the given
|
||||
* contact using the current transport and configuration properties.
|
||||
|
||||
Reference in New Issue
Block a user