mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Use namespaced strings for Transport IDs
This commit is contained in:
@@ -33,14 +33,13 @@ import java.util.logging.Logger;
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.keyagreement.KeyAgreementConstants.TRANSPORT_ID_LAN;
|
||||
import static org.briarproject.api.plugins.LanTcpConstants.ID;
|
||||
import static org.briarproject.util.ByteUtils.MAX_16_BIT_UNSIGNED;
|
||||
import static org.briarproject.util.PrivacyUtils.scrubSocketAddress;
|
||||
|
||||
@NotNullByDefault
|
||||
class LanTcpPlugin extends TcpPlugin {
|
||||
|
||||
static final TransportId ID = new TransportId("lan");
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(LanTcpPlugin.class.getName());
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import org.briarproject.api.plugins.duplex.DuplexPluginFactory;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import static org.briarproject.api.plugins.LanTcpConstants.ID;
|
||||
|
||||
public class LanTcpPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
private static final int MAX_LATENCY = 30 * 1000; // 30 seconds
|
||||
@@ -28,7 +30,7 @@ public class LanTcpPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
@Override
|
||||
public TransportId getId() {
|
||||
return LanTcpPlugin.ID;
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,12 +16,12 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import static org.briarproject.api.plugins.WanTcpConstants.ID;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
class WanTcpPlugin extends TcpPlugin {
|
||||
|
||||
static final TransportId ID = new TransportId("wan");
|
||||
|
||||
private static final String PROP_IP_PORT = "ipPort";
|
||||
|
||||
private final PortMapper portMapper;
|
||||
|
||||
@@ -10,6 +10,8 @@ import org.briarproject.api.plugins.duplex.DuplexPluginFactory;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import static org.briarproject.api.plugins.WanTcpConstants.ID;
|
||||
|
||||
public class WanTcpPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
private static final int MAX_LATENCY = 30 * 1000; // 30 seconds
|
||||
@@ -31,7 +33,7 @@ public class WanTcpPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
@Override
|
||||
public TransportId getId() {
|
||||
return WanTcpPlugin.ID;
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user