mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 07:39:53 +01:00
Renamed InvalidTransportException -> InvalidPropertiesException.
This commit is contained in:
@@ -4,7 +4,7 @@ package net.sf.briar.api.transport;
|
|||||||
* Thrown by a transport plugin if the specified transport properties are
|
* Thrown by a transport plugin if the specified transport properties are
|
||||||
* invalid.
|
* invalid.
|
||||||
*/
|
*/
|
||||||
public class InvalidTransportException extends Exception {
|
public class InvalidPropertiesException extends Exception {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6516979794153838108L;
|
private static final long serialVersionUID = -6516979794153838108L;
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ import java.util.Map;
|
|||||||
import net.sf.briar.api.ContactId;
|
import net.sf.briar.api.ContactId;
|
||||||
import net.sf.briar.api.TransportId;
|
import net.sf.briar.api.TransportId;
|
||||||
import net.sf.briar.api.transport.InvalidConfigException;
|
import net.sf.briar.api.transport.InvalidConfigException;
|
||||||
import net.sf.briar.api.transport.InvalidTransportException;
|
import net.sf.briar.api.transport.InvalidPropertiesException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for transport plugins that do not support bidirectional,
|
* An interface for transport plugins that do not support bidirectional,
|
||||||
@@ -24,7 +24,7 @@ public interface BatchTransportPlugin {
|
|||||||
void start(Map<String, String> localProperties,
|
void start(Map<String, String> localProperties,
|
||||||
Map<ContactId, Map<String, String>> remoteProperties,
|
Map<ContactId, Map<String, String>> remoteProperties,
|
||||||
Map<String, String> config, BatchTransportCallback c)
|
Map<String, String> config, BatchTransportCallback c)
|
||||||
throws InvalidTransportException, InvalidConfigException, IOException;
|
throws InvalidPropertiesException, InvalidConfigException, IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the plugin. No further connections will be passed to the callback
|
* Stops the plugin. No further connections will be passed to the callback
|
||||||
@@ -34,11 +34,11 @@ public interface BatchTransportPlugin {
|
|||||||
|
|
||||||
/** Updates the plugin's local transport properties. */
|
/** Updates the plugin's local transport properties. */
|
||||||
void setLocalProperties(Map<String, String> properties)
|
void setLocalProperties(Map<String, String> properties)
|
||||||
throws InvalidTransportException;
|
throws InvalidPropertiesException;
|
||||||
|
|
||||||
/** Updates the plugin's transport properties for the given contact. */
|
/** Updates the plugin's transport properties for the given contact. */
|
||||||
void setRemoteProperties(ContactId c, Map<String, String> properties)
|
void setRemoteProperties(ContactId c, Map<String, String> properties)
|
||||||
throws InvalidTransportException;
|
throws InvalidPropertiesException;
|
||||||
|
|
||||||
/** Updates the plugin's configuration properties. */
|
/** Updates the plugin's configuration properties. */
|
||||||
void setConfig(Map<String, String> config) throws InvalidConfigException;
|
void setConfig(Map<String, String> config) throws InvalidConfigException;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
import net.sf.briar.api.ContactId;
|
import net.sf.briar.api.ContactId;
|
||||||
import net.sf.briar.api.TransportId;
|
import net.sf.briar.api.TransportId;
|
||||||
import net.sf.briar.api.transport.InvalidConfigException;
|
import net.sf.briar.api.transport.InvalidConfigException;
|
||||||
import net.sf.briar.api.transport.InvalidTransportException;
|
import net.sf.briar.api.transport.InvalidPropertiesException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for transport plugins that support bidirectional, reliable,
|
* An interface for transport plugins that support bidirectional, reliable,
|
||||||
@@ -23,7 +23,7 @@ public interface StreamTransportPlugin {
|
|||||||
void start(Map<String, String> localProperties,
|
void start(Map<String, String> localProperties,
|
||||||
Map<ContactId, Map<String, String>> remoteProperties,
|
Map<ContactId, Map<String, String>> remoteProperties,
|
||||||
Map<String, String> config, StreamTransportCallback c)
|
Map<String, String> config, StreamTransportCallback c)
|
||||||
throws InvalidTransportException, InvalidConfigException;
|
throws InvalidPropertiesException, InvalidConfigException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the plugin. No further connections will be passed to the callback
|
* Stops the plugin. No further connections will be passed to the callback
|
||||||
@@ -33,11 +33,11 @@ public interface StreamTransportPlugin {
|
|||||||
|
|
||||||
/** Updates the plugin's local transport properties. */
|
/** Updates the plugin's local transport properties. */
|
||||||
void setLocalProperties(Map<String, String> properties)
|
void setLocalProperties(Map<String, String> properties)
|
||||||
throws InvalidTransportException;
|
throws InvalidPropertiesException;
|
||||||
|
|
||||||
/** Updates the plugin's transport properties for the given contact. */
|
/** Updates the plugin's transport properties for the given contact. */
|
||||||
void setRemoteProperties(ContactId c, Map<String, String> properties)
|
void setRemoteProperties(ContactId c, Map<String, String> properties)
|
||||||
throws InvalidTransportException;
|
throws InvalidPropertiesException;
|
||||||
|
|
||||||
/** Updates the plugin's configuration properties. */
|
/** Updates the plugin's configuration properties. */
|
||||||
void setConfig(Map<String, String> config) throws InvalidConfigException;
|
void setConfig(Map<String, String> config) throws InvalidConfigException;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.concurrent.Executor;
|
|||||||
|
|
||||||
import net.sf.briar.api.ContactId;
|
import net.sf.briar.api.ContactId;
|
||||||
import net.sf.briar.api.transport.InvalidConfigException;
|
import net.sf.briar.api.transport.InvalidConfigException;
|
||||||
import net.sf.briar.api.transport.InvalidTransportException;
|
import net.sf.briar.api.transport.InvalidPropertiesException;
|
||||||
import net.sf.briar.api.transport.TransportConstants;
|
import net.sf.briar.api.transport.TransportConstants;
|
||||||
import net.sf.briar.api.transport.batch.BatchTransportCallback;
|
import net.sf.briar.api.transport.batch.BatchTransportCallback;
|
||||||
import net.sf.briar.api.transport.batch.BatchTransportPlugin;
|
import net.sf.briar.api.transport.batch.BatchTransportPlugin;
|
||||||
@@ -41,7 +41,7 @@ abstract class FilePlugin implements BatchTransportPlugin {
|
|||||||
public synchronized void start(Map<String, String> localProperties,
|
public synchronized void start(Map<String, String> localProperties,
|
||||||
Map<ContactId, Map<String, String>> remoteProperties,
|
Map<ContactId, Map<String, String>> remoteProperties,
|
||||||
Map<String, String> config, BatchTransportCallback callback)
|
Map<String, String> config, BatchTransportCallback callback)
|
||||||
throws InvalidTransportException, InvalidConfigException, IOException {
|
throws InvalidPropertiesException, InvalidConfigException, IOException {
|
||||||
if(started) throw new IllegalStateException();
|
if(started) throw new IllegalStateException();
|
||||||
started = true;
|
started = true;
|
||||||
this.localProperties = localProperties;
|
this.localProperties = localProperties;
|
||||||
@@ -56,14 +56,14 @@ abstract class FilePlugin implements BatchTransportPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setLocalProperties(Map<String, String> properties)
|
public synchronized void setLocalProperties(Map<String, String> properties)
|
||||||
throws InvalidTransportException {
|
throws InvalidPropertiesException {
|
||||||
if(!started) throw new IllegalStateException();
|
if(!started) throw new IllegalStateException();
|
||||||
localProperties = properties;
|
localProperties = properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setRemoteProperties(ContactId c,
|
public synchronized void setRemoteProperties(ContactId c,
|
||||||
Map<String, String> properties)
|
Map<String, String> properties)
|
||||||
throws InvalidTransportException {
|
throws InvalidPropertiesException {
|
||||||
if(!started) throw new IllegalStateException();
|
if(!started) throw new IllegalStateException();
|
||||||
remoteProperties.put(c, properties);
|
remoteProperties.put(c, properties);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.concurrent.Executor;
|
|||||||
import net.sf.briar.api.ContactId;
|
import net.sf.briar.api.ContactId;
|
||||||
import net.sf.briar.api.TransportId;
|
import net.sf.briar.api.TransportId;
|
||||||
import net.sf.briar.api.transport.InvalidConfigException;
|
import net.sf.briar.api.transport.InvalidConfigException;
|
||||||
import net.sf.briar.api.transport.InvalidTransportException;
|
import net.sf.briar.api.transport.InvalidPropertiesException;
|
||||||
import net.sf.briar.api.transport.batch.BatchTransportCallback;
|
import net.sf.briar.api.transport.batch.BatchTransportCallback;
|
||||||
|
|
||||||
class RemovableDrivePlugin extends FilePlugin
|
class RemovableDrivePlugin extends FilePlugin
|
||||||
@@ -37,7 +37,7 @@ implements RemovableDriveMonitor.Callback {
|
|||||||
public void start(Map<String, String> localProperties,
|
public void start(Map<String, String> localProperties,
|
||||||
Map<ContactId, Map<String, String>> remoteProperties,
|
Map<ContactId, Map<String, String>> remoteProperties,
|
||||||
Map<String, String> config, BatchTransportCallback callback)
|
Map<String, String> config, BatchTransportCallback callback)
|
||||||
throws InvalidTransportException, InvalidConfigException, IOException {
|
throws InvalidPropertiesException, InvalidConfigException, IOException {
|
||||||
super.start(localProperties, remoteProperties, config, callback);
|
super.start(localProperties, remoteProperties, config, callback);
|
||||||
monitor.start(this);
|
monitor.start(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import java.util.concurrent.Executor;
|
|||||||
|
|
||||||
import net.sf.briar.api.ContactId;
|
import net.sf.briar.api.ContactId;
|
||||||
import net.sf.briar.api.transport.InvalidConfigException;
|
import net.sf.briar.api.transport.InvalidConfigException;
|
||||||
import net.sf.briar.api.transport.InvalidTransportException;
|
import net.sf.briar.api.transport.InvalidPropertiesException;
|
||||||
import net.sf.briar.api.transport.stream.StreamTransportCallback;
|
import net.sf.briar.api.transport.stream.StreamTransportCallback;
|
||||||
import net.sf.briar.api.transport.stream.StreamTransportConnection;
|
import net.sf.briar.api.transport.stream.StreamTransportConnection;
|
||||||
import net.sf.briar.api.transport.stream.StreamTransportPlugin;
|
import net.sf.briar.api.transport.stream.StreamTransportPlugin;
|
||||||
@@ -36,7 +36,7 @@ abstract class SocketPlugin implements StreamTransportPlugin {
|
|||||||
public synchronized void start(Map<String, String> localProperties,
|
public synchronized void start(Map<String, String> localProperties,
|
||||||
Map<ContactId, Map<String, String>> remoteProperties,
|
Map<ContactId, Map<String, String>> remoteProperties,
|
||||||
Map<String, String> config, StreamTransportCallback callback)
|
Map<String, String> config, StreamTransportCallback callback)
|
||||||
throws InvalidTransportException, InvalidConfigException {
|
throws InvalidPropertiesException, InvalidConfigException {
|
||||||
if(started) throw new IllegalStateException();
|
if(started) throw new IllegalStateException();
|
||||||
started = true;
|
started = true;
|
||||||
this.localProperties = localProperties;
|
this.localProperties = localProperties;
|
||||||
@@ -67,14 +67,14 @@ abstract class SocketPlugin implements StreamTransportPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setLocalProperties(Map<String, String> properties)
|
public synchronized void setLocalProperties(Map<String, String> properties)
|
||||||
throws InvalidTransportException {
|
throws InvalidPropertiesException {
|
||||||
if(!started) throw new IllegalStateException();
|
if(!started) throw new IllegalStateException();
|
||||||
localProperties = properties;
|
localProperties = properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setRemoteProperties(ContactId c,
|
public synchronized void setRemoteProperties(ContactId c,
|
||||||
Map<String, String> properties)
|
Map<String, String> properties)
|
||||||
throws InvalidTransportException {
|
throws InvalidPropertiesException {
|
||||||
if(!started) throw new IllegalStateException();
|
if(!started) throw new IllegalStateException();
|
||||||
remoteProperties.put(c, properties);
|
remoteProperties.put(c, properties);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user