Connection readers and writers don't need the connection context.

This commit is contained in:
akwizgran
2011-12-02 14:23:45 +00:00
parent 51d58fadad
commit c8338f9866
10 changed files with 35 additions and 64 deletions

View File

@@ -6,15 +6,15 @@ public interface ConnectionReaderFactory {
/**
* Creates a connection reader for a batch-mode connection or the
* initiator's side of a stream-mode connection.
* initiator's side of a stream-mode connection. The secret is erased
* before this method returns.
*/
ConnectionReader createConnectionReader(InputStream in,
ConnectionContext ctx, byte[] tag);
ConnectionReader createConnectionReader(InputStream in, byte[] secret,
byte[] tag);
/**
* Creates a connection reader for the responder's side of a stream-mode
* connection.
* connection. The secret is erased before this method returns.
*/
ConnectionReader createConnectionReader(InputStream in,
ConnectionContext ctx);
ConnectionReader createConnectionReader(InputStream in, byte[] secret);
}

View File

@@ -6,15 +6,16 @@ public interface ConnectionWriterFactory {
/**
* Creates a connection writer for a batch-mode connection or the
* initiator's side of a stream-mode connection.
* initiator's side of a stream-mode connection. The secret is erased
* before this method returns.
*/
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
ConnectionContext ctx);
byte[] secret);
/**
* Creates a connection writer for the responder's side of a stream-mode
* connection.
* connection. The secret is erased before this method returns.
*/
ConnectionWriter createConnectionWriter(OutputStream out, long capacity,
ConnectionContext ctx, byte[] tag);
byte[] secret, byte[] tag);
}