diff --git a/briar-android/src/org/briarproject/plugins/droidtooth/DroidtoothPluginFactory.java b/briar-android/src/org/briarproject/plugins/droidtooth/DroidtoothPluginFactory.java index ee7acf26ba47c4fb39128f3eede571189c39e4f7..7bc16525ac0907e75839c8205c0329cfe6bfea9a 100644 --- a/briar-android/src/org/briarproject/plugins/droidtooth/DroidtoothPluginFactory.java +++ b/briar-android/src/org/briarproject/plugins/droidtooth/DroidtoothPluginFactory.java @@ -16,8 +16,8 @@ import java.util.concurrent.Executor; public class DroidtoothPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -36,14 +36,17 @@ public class DroidtoothPluginFactory implements DuplexPluginFactory { this.backoffFactory = backoffFactory; } + @Override public TransportId getId() { return DroidtoothPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE); diff --git a/briar-android/src/org/briarproject/plugins/tcp/AndroidLanTcpPluginFactory.java b/briar-android/src/org/briarproject/plugins/tcp/AndroidLanTcpPluginFactory.java index 16d456ad3b22e47a2e128e45afd55705dccba3dc..50ee377b84516ed0bf3eb3a8e29663878b8439d2 100644 --- a/briar-android/src/org/briarproject/plugins/tcp/AndroidLanTcpPluginFactory.java +++ b/briar-android/src/org/briarproject/plugins/tcp/AndroidLanTcpPluginFactory.java @@ -15,8 +15,8 @@ public class AndroidLanTcpPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds private static final int MAX_IDLE_TIME = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -30,14 +30,17 @@ public class AndroidLanTcpPluginFactory implements DuplexPluginFactory { this.appContext = appContext; } + @Override public TransportId getId() { return LanTcpPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE); diff --git a/briar-android/src/org/briarproject/plugins/tor/TorPluginFactory.java b/briar-android/src/org/briarproject/plugins/tor/TorPluginFactory.java index 958c45c4158bd30e20d7e3ae2c389fd7868e18a6..9cfabc3cb5a42e1833948920b752ce18107cccf0 100644 --- a/briar-android/src/org/briarproject/plugins/tor/TorPluginFactory.java +++ b/briar-android/src/org/briarproject/plugins/tor/TorPluginFactory.java @@ -24,8 +24,8 @@ public class TorPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds private static final int MAX_IDLE_TIME = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -46,14 +46,17 @@ public class TorPluginFactory implements DuplexPluginFactory { this.backoffFactory = backoffFactory; } + @Override public TransportId getId() { return TorPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { // Check that we have a Tor binary for this architecture diff --git a/briar-core/src/org/briarproject/plugins/tcp/LanTcpPluginFactory.java b/briar-core/src/org/briarproject/plugins/tcp/LanTcpPluginFactory.java index 9b354427a240b81f05bb54aadade681ccdf3727b..541b8ad5ff4b9cc772f0d262cae36d23f6b8cd4e 100644 --- a/briar-core/src/org/briarproject/plugins/tcp/LanTcpPluginFactory.java +++ b/briar-core/src/org/briarproject/plugins/tcp/LanTcpPluginFactory.java @@ -13,8 +13,8 @@ public class LanTcpPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds private static final int MAX_IDLE_TIME = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -26,14 +26,17 @@ public class LanTcpPluginFactory implements DuplexPluginFactory { this.backoffFactory = backoffFactory; } + @Override public TransportId getId() { return LanTcpPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE); diff --git a/briar-core/src/org/briarproject/plugins/tcp/WanTcpPluginFactory.java b/briar-core/src/org/briarproject/plugins/tcp/WanTcpPluginFactory.java index 44fdf5edfdf1ffe9b7b4c60c04678f6002dd6d4f..b5e2823ca7ab1e3959ff6e4952d847c08ddeaeb2 100644 --- a/briar-core/src/org/briarproject/plugins/tcp/WanTcpPluginFactory.java +++ b/briar-core/src/org/briarproject/plugins/tcp/WanTcpPluginFactory.java @@ -14,8 +14,8 @@ public class WanTcpPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds private static final int MAX_IDLE_TIME = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -29,14 +29,17 @@ public class WanTcpPluginFactory implements DuplexPluginFactory { this.shutdownManager = shutdownManager; } + @Override public TransportId getId() { return WanTcpPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE); diff --git a/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPluginFactory.java b/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPluginFactory.java index d4165bc410fbbe3ba5f6a1ff71e55a388bf8945d..1fd6648b3ba134ee6579a9476783c4fc12a357b0 100644 --- a/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPluginFactory.java +++ b/briar-desktop/src/org/briarproject/plugins/bluetooth/BluetoothPluginFactory.java @@ -13,8 +13,8 @@ import java.util.concurrent.Executor; public class BluetoothPluginFactory implements DuplexPluginFactory { private static final int MAX_LATENCY = 30 * 1000; // 30 seconds - private static final int MIN_POLLING_INTERVAL = 2 * 60 * 1000; // 2 minutes - private static final int MAX_POLLING_INTERVAL = 60 * 60 * 1000; // 1 hour + private static final int MIN_POLLING_INTERVAL = 60 * 1000; // 1 minute + private static final int MAX_POLLING_INTERVAL = 10 * 60 * 1000; // 10 mins private static final double BACKOFF_BASE = 1.2; private final Executor ioExecutor; @@ -28,14 +28,17 @@ public class BluetoothPluginFactory implements DuplexPluginFactory { this.backoffFactory = backoffFactory; } + @Override public TransportId getId() { return BluetoothPlugin.ID; } + @Override public int getMaxLatency() { return MAX_LATENCY; } + @Override public DuplexPlugin createPlugin(DuplexPluginCallback callback) { Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL, MAX_POLLING_INTERVAL, BACKOFF_BASE);