mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
More refactoring to connect ConnectionRecogniser to ConnectionReader.
Added TestDatabaseModule so tests can specify their own DB configuration. The modules are currently too tightly coupled - see whether any dependencies can be removed.
This commit is contained in:
@@ -7,7 +7,7 @@ import net.sf.briar.api.protocol.BatchId;
|
||||
/** An interface for creating a batch packet. */
|
||||
public interface BatchWriter {
|
||||
|
||||
/** Returns the capacity of the batch. */
|
||||
/** Returns the capacity of the batch in bytes. */
|
||||
int getCapacity();
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,6 @@ import java.io.InputStream;
|
||||
|
||||
public interface ConnectionReaderFactory {
|
||||
|
||||
ConnectionReader createConnectionReader(InputStream in, boolean initiator,
|
||||
int transportId, long connection, byte[] secret);
|
||||
ConnectionReader createConnectionReader(InputStream in, byte[] encryptedIv,
|
||||
byte[] secret);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
public interface ConnectionRecogniserFactory {
|
||||
|
||||
ConnectionRecogniser createConnectionRecogniser(int transportId);
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public interface ConnectionWriter {
|
||||
OutputStream getOutputStream();
|
||||
|
||||
/** Returns the maximum number of bytes that can be written. */
|
||||
long getCapacity();
|
||||
long getRemainingCapacity();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.OutputStream;
|
||||
*/
|
||||
public interface BatchTransportWriter {
|
||||
|
||||
/** Returns the maximum number of bytes that can be written. */
|
||||
/** Returns the capacity of the transport in bytes. */
|
||||
long getCapacity();
|
||||
|
||||
/** Returns an output stream for writing to the transport. */
|
||||
|
||||
Reference in New Issue
Block a user