Skip to content
Snippets Groups Projects
Commit a24275d9 authored by akwizgran's avatar akwizgran
Browse files

Javadocs for reliability package.

parent 916fa665
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,34 @@ package net.sf.briar.api.reliability;
import java.io.InputStream;
import java.io.OutputStream;
/**
* A protocol layer that attempts to ensure reliable, ordered delivery of data
* across an unreliable lower layer. Interactions with the lower layer use the
* buffer-oriented {@link ReadHandler} and {@link WriteHandler} interfaces; the
* reliability layer presents stream-oriented {@link java.io.InputStream} and
* {@link java.io.OutputStream} interfaces to higher layers.
*/
public interface ReliabilityLayer extends ReadHandler {
/** Starts the reliability layer. */
void start();
/**
* Stops the reliability layer. After this method returns, no more data
* will be sent to lower layers, and any data received from lower layers
* will be ignored.
*/
void stop();
/**
* Returns an input stream for higher layers to read from the reliability
* layer.
*/
InputStream getInputStream();
/**
* Returns an output stream for higher layers to write to the reliability
* layer.
*/
OutputStream getOutputStream();
}
......@@ -2,5 +2,6 @@ package net.sf.briar.api.reliability;
public interface ReliabilityLayerFactory {
/** Returns a reliability layer that writes to the given lower layer. */
ReliabilityLayer createReliabilityLayer(WriteHandler writeHandler);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment