mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Converted {Incoming,Outgoing}BatchConnection into Runnables.
Also changed the dispose() method of readers/writers/connections to swallow any exceptions that occur, since the caller can't do anything except log them.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
@@ -16,5 +15,5 @@ public interface BatchTransportReader {
|
||||
* Closes the reader and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the reader.
|
||||
*/
|
||||
void dispose(boolean success) throws IOException;
|
||||
void dispose(boolean success);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
@@ -19,5 +18,5 @@ public interface BatchTransportWriter {
|
||||
* Closes the writer and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the writer.
|
||||
*/
|
||||
void dispose(boolean success) throws IOException;
|
||||
void dispose(boolean success);
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ public interface StreamTransportConnection {
|
||||
* Closes the connection and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the connection.
|
||||
*/
|
||||
void dispose(boolean success) throws IOException;
|
||||
void dispose(boolean success);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
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.BatchTransportReader;
|
||||
import net.sf.briar.api.transport.BatchTransportWriter;
|
||||
|
||||
public interface BatchConnectionFactory {
|
||||
|
||||
Runnable createOutgoingConnection(TransportId t, ContactId c,
|
||||
BatchTransportWriter w);
|
||||
|
||||
Runnable createIncomingConnection(ContactId c, BatchTransportReader r,
|
||||
byte[] encryptedIv);
|
||||
}
|
||||
Reference in New Issue
Block a user