mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Added factory methods for segmented connection readers.
This commit is contained in:
@@ -2,6 +2,8 @@ package net.sf.briar.api.plugins;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.sf.briar.api.transport.Segment;
|
||||
|
||||
public interface SegmentSink {
|
||||
|
||||
/** Writes the given segment. */
|
||||
|
||||
@@ -2,6 +2,8 @@ package net.sf.briar.api.plugins;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.sf.briar.api.transport.Segment;
|
||||
|
||||
public interface SegmentSource {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,8 @@ package net.sf.briar.api.transport;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.sf.briar.api.plugins.SegmentSource;
|
||||
|
||||
public interface ConnectionReaderFactory {
|
||||
|
||||
/**
|
||||
@@ -12,9 +14,23 @@ public interface ConnectionReaderFactory {
|
||||
ConnectionReader createConnectionReader(InputStream in, byte[] secret,
|
||||
byte[] tag);
|
||||
|
||||
/**
|
||||
* Creates a connection reader for a simplex connection or the initiator's
|
||||
* side of a duplex connection. The secret is erased before this method
|
||||
* returns.
|
||||
*/
|
||||
ConnectionReader createConnectionReader(SegmentSource in, byte[] secret,
|
||||
Segment buffered);
|
||||
|
||||
/**
|
||||
* Creates a connection reader for the responder's side of a duplex
|
||||
* connection. The secret is erased before this method returns.
|
||||
*/
|
||||
ConnectionReader createConnectionReader(InputStream in, byte[] secret);
|
||||
|
||||
/**
|
||||
* Creates a connection reader for the responder's side of a duplex
|
||||
* connection. The secret is erased before this method returns.
|
||||
*/
|
||||
ConnectionReader createConnectionReader(SegmentSource in, byte[] secret);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package net.sf.briar.api.plugins;
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
public interface Segment {
|
||||
|
||||
Reference in New Issue
Block a user