Added support for local transport details. Each bundle contains the sender's latest transport details.

This commit is contained in:
akwizgran
2011-07-06 19:07:10 +01:00
parent b548820f77
commit 7fb589075d
7 changed files with 200 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
package net.sf.briar.api.protocol;
import java.util.Map;
/** A bundle of acknowledgements, subscriptions, and batches of messages. */
public interface Bundle {
@@ -29,6 +31,12 @@ public interface Bundle {
/** Adds a subscription to the bundle. Cannot be called after seal(). */
void addSubscription(GroupId g);
/** Returns the transport details contained in the bundle. */
Map<String, String> getTransports();
/** Adds a transport detail to the bundle. Cannot be called after seal(). */
void addTransport(String key, String value);
/** Returns the batches of messages contained in the bundle. */
Iterable<Batch> getBatches();