mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Implemented PacketReader, renamed Packet{Reader,Writer}Factory in the
protocol component to Protocol{Reader,Writer}Factory.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package net.sf.briar.api.protocol.writers;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.sf.briar.api.protocol.Ack;
|
||||
import net.sf.briar.api.protocol.Batch;
|
||||
import net.sf.briar.api.protocol.Offer;
|
||||
import net.sf.briar.api.protocol.Request;
|
||||
import net.sf.briar.api.protocol.SubscriptionUpdate;
|
||||
import net.sf.briar.api.protocol.TransportUpdate;
|
||||
import net.sf.briar.api.serial.ObjectReader;
|
||||
|
||||
public interface ProtocolReaderFactory {
|
||||
|
||||
ObjectReader<Ack> createAckReader(InputStream in);
|
||||
|
||||
ObjectReader<Batch> createBatchReader(InputStream in);
|
||||
|
||||
ObjectReader<Offer> createOfferReader(InputStream in);
|
||||
|
||||
ObjectReader<Request> createRequestReader(InputStream in);
|
||||
|
||||
ObjectReader<SubscriptionUpdate> createSubscriptionReader(InputStream in);
|
||||
|
||||
ObjectReader<TransportUpdate> createTransportReader(InputStream in);
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package net.sf.briar.api.protocol.writers;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface PacketWriterFactory {
|
||||
public interface ProtocolWriterFactory {
|
||||
|
||||
AckWriter createAckWriter(OutputStream out);
|
||||
|
||||
@@ -8,9 +8,9 @@ public interface ConnectionWindow {
|
||||
|
||||
int getBitmap();
|
||||
|
||||
boolean isSeen(long connectionNumber);
|
||||
boolean isSeen(long connection);
|
||||
|
||||
void setSeen(long connectionNumber);
|
||||
void setSeen(long connection);
|
||||
|
||||
Collection<Long> getUnseenConnectionNumbers();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import javax.crypto.SecretKey;
|
||||
|
||||
public interface PacketWriterFactory {
|
||||
|
||||
PacketWriter createPacketWriter(OutputStream out, int transportIdentifier,
|
||||
long connectionNumber, SecretKey macKey, SecretKey tagKey,
|
||||
PacketWriter createPacketWriter(OutputStream out, int transportId,
|
||||
long connection, SecretKey macKey, SecretKey tagKey,
|
||||
SecretKey packetKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user