mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Moved reliability layer into its own package.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package net.sf.briar.api.reliability;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface ReadHandler {
|
||||
|
||||
void handleRead(byte[] b) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package net.sf.briar.api.reliability;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface ReliabilityLayer extends ReadHandler, WriteHandler {
|
||||
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
InputStream getInputStream();
|
||||
|
||||
OutputStream getOutputStream();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package net.sf.briar.api.reliability;
|
||||
|
||||
public interface ReliabilityLayerFactory {
|
||||
|
||||
ReliabilityLayer createReliabilityLayer(WriteHandler writeHandler);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package net.sf.briar.api.reliability;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface WriteHandler {
|
||||
|
||||
void handleWrite(byte[] b) throws IOException;
|
||||
}
|
||||
Reference in New Issue
Block a user