mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Changed drive monitors to use callbacks rather than blocking.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package net.sf.briar.api.transport.batch;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.TransportId;
|
||||
import net.sf.briar.api.transport.TransportCallback;
|
||||
|
||||
/**
|
||||
@@ -8,7 +10,9 @@ import net.sf.briar.api.transport.TransportCallback;
|
||||
*/
|
||||
public interface BatchTransportCallback extends TransportCallback {
|
||||
|
||||
void readerCreated(BatchTransportReader r);
|
||||
void readerCreated(ContactId contactId, byte[] encryptedIv,
|
||||
BatchTransportReader r);
|
||||
|
||||
void writerCreated(BatchTransportWriter w);
|
||||
void writerCreated(ContactId contactId, TransportId t, long connection,
|
||||
BatchTransportWriter w);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.sf.briar.api.transport.batch;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
@@ -23,13 +24,13 @@ public interface BatchTransportPlugin {
|
||||
void start(Map<String, String> localProperties,
|
||||
Map<ContactId, Map<String, String>> remoteProperties,
|
||||
Map<String, String> config, BatchTransportCallback c)
|
||||
throws InvalidTransportException, InvalidConfigException;
|
||||
throws InvalidTransportException, InvalidConfigException, IOException;
|
||||
|
||||
/**
|
||||
* Stops the plugin. No further connections will be passed to the callback
|
||||
* after this method has returned.
|
||||
*/
|
||||
void stop();
|
||||
void stop() throws IOException;
|
||||
|
||||
/** Updates the plugin's local transport properties. */
|
||||
void setLocalProperties(Map<String, String> properties)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.sf.briar.api.transport.stream;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.TransportId;
|
||||
import net.sf.briar.api.transport.TransportCallback;
|
||||
|
||||
/**
|
||||
@@ -8,5 +10,9 @@ import net.sf.briar.api.transport.TransportCallback;
|
||||
*/
|
||||
public interface StreamTransportCallback extends TransportCallback {
|
||||
|
||||
void connectionCreated(StreamTransportConnection c);
|
||||
void incomingConnectionCreated(ContactId contactId, byte[] encryptedIv,
|
||||
StreamTransportConnection c);
|
||||
|
||||
void outgoingConnectionCreated(ContactId contactId, TransportId t,
|
||||
long connection, StreamTransportConnection c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user