diff --git a/api/net/sf/briar/api/transport/InvalidTransportException.java b/api/net/sf/briar/api/transport/InvalidPropertiesException.java similarity index 77% rename from api/net/sf/briar/api/transport/InvalidTransportException.java rename to api/net/sf/briar/api/transport/InvalidPropertiesException.java index 3b1d1bfb999d91d566bfc111f898d19e73586e96..20edd733ab5937591f5f87e92d2845cef86585e2 100644 --- a/api/net/sf/briar/api/transport/InvalidTransportException.java +++ b/api/net/sf/briar/api/transport/InvalidPropertiesException.java @@ -4,7 +4,7 @@ package net.sf.briar.api.transport; * Thrown by a transport plugin if the specified transport properties are * invalid. */ -public class InvalidTransportException extends Exception { +public class InvalidPropertiesException extends Exception { private static final long serialVersionUID = -6516979794153838108L; } diff --git a/api/net/sf/briar/api/transport/batch/BatchTransportPlugin.java b/api/net/sf/briar/api/transport/batch/BatchTransportPlugin.java index 4bd53dd5be9a85074ca61f5d97281e91f516ee59..02141015bca831c2924a0d4e1310c97d3f12c063 100644 --- a/api/net/sf/briar/api/transport/batch/BatchTransportPlugin.java +++ b/api/net/sf/briar/api/transport/batch/BatchTransportPlugin.java @@ -6,7 +6,7 @@ import java.util.Map; import net.sf.briar.api.ContactId; import net.sf.briar.api.TransportId; 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, @@ -24,7 +24,7 @@ public interface BatchTransportPlugin { void start(Map<String, String> localProperties, Map<ContactId, Map<String, String>> remoteProperties, 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 @@ -34,11 +34,11 @@ public interface BatchTransportPlugin { /** Updates the plugin's local transport properties. */ void setLocalProperties(Map<String, String> properties) - throws InvalidTransportException; + throws InvalidPropertiesException; /** Updates the plugin's transport properties for the given contact. */ void setRemoteProperties(ContactId c, Map<String, String> properties) - throws InvalidTransportException; + throws InvalidPropertiesException; /** Updates the plugin's configuration properties. */ void setConfig(Map<String, String> config) throws InvalidConfigException; diff --git a/api/net/sf/briar/api/transport/stream/StreamTransportPlugin.java b/api/net/sf/briar/api/transport/stream/StreamTransportPlugin.java index ff2c78bb6a25977d48f012a3022df9fdbd766437..1a2730ec9237e292b76e53a74619cab1a3ef0943 100644 --- a/api/net/sf/briar/api/transport/stream/StreamTransportPlugin.java +++ b/api/net/sf/briar/api/transport/stream/StreamTransportPlugin.java @@ -5,7 +5,7 @@ import java.util.Map; import net.sf.briar.api.ContactId; import net.sf.briar.api.TransportId; 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, @@ -23,7 +23,7 @@ public interface StreamTransportPlugin { void start(Map<String, String> localProperties, Map<ContactId, Map<String, String>> remoteProperties, Map<String, String> config, StreamTransportCallback c) - throws InvalidTransportException, InvalidConfigException; + throws InvalidPropertiesException, InvalidConfigException; /** * 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. */ void setLocalProperties(Map<String, String> properties) - throws InvalidTransportException; + throws InvalidPropertiesException; /** Updates the plugin's transport properties for the given contact. */ void setRemoteProperties(ContactId c, Map<String, String> properties) - throws InvalidTransportException; + throws InvalidPropertiesException; /** Updates the plugin's configuration properties. */ void setConfig(Map<String, String> config) throws InvalidConfigException; diff --git a/components/net/sf/briar/plugins/file/FilePlugin.java b/components/net/sf/briar/plugins/file/FilePlugin.java index ca0a5c7e2785b4ec175e4dd484941ad1a547b99c..634102280e2bcdbfa4ec09a2142f876bd9be6aec 100644 --- a/components/net/sf/briar/plugins/file/FilePlugin.java +++ b/components/net/sf/briar/plugins/file/FilePlugin.java @@ -10,7 +10,7 @@ import java.util.concurrent.Executor; import net.sf.briar.api.ContactId; 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.batch.BatchTransportCallback; 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, Map<ContactId, Map<String, String>> remoteProperties, Map<String, String> config, BatchTransportCallback callback) - throws InvalidTransportException, InvalidConfigException, IOException { + throws InvalidPropertiesException, InvalidConfigException, IOException { if(started) throw new IllegalStateException(); started = true; this.localProperties = localProperties; @@ -56,14 +56,14 @@ abstract class FilePlugin implements BatchTransportPlugin { } public synchronized void setLocalProperties(Map<String, String> properties) - throws InvalidTransportException { + throws InvalidPropertiesException { if(!started) throw new IllegalStateException(); localProperties = properties; } public synchronized void setRemoteProperties(ContactId c, Map<String, String> properties) - throws InvalidTransportException { + throws InvalidPropertiesException { if(!started) throw new IllegalStateException(); remoteProperties.put(c, properties); } diff --git a/components/net/sf/briar/plugins/file/RemovableDrivePlugin.java b/components/net/sf/briar/plugins/file/RemovableDrivePlugin.java index 8810933439df485d5ff1043198f991f3d7422187..b4e6d72f0f7c05698ce067ecea297d6b60e047a1 100644 --- a/components/net/sf/briar/plugins/file/RemovableDrivePlugin.java +++ b/components/net/sf/briar/plugins/file/RemovableDrivePlugin.java @@ -9,7 +9,7 @@ import java.util.concurrent.Executor; import net.sf.briar.api.ContactId; import net.sf.briar.api.TransportId; 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; class RemovableDrivePlugin extends FilePlugin @@ -37,7 +37,7 @@ implements RemovableDriveMonitor.Callback { public void start(Map<String, String> localProperties, Map<ContactId, Map<String, String>> remoteProperties, Map<String, String> config, BatchTransportCallback callback) - throws InvalidTransportException, InvalidConfigException, IOException { + throws InvalidPropertiesException, InvalidConfigException, IOException { super.start(localProperties, remoteProperties, config, callback); monitor.start(this); } diff --git a/components/net/sf/briar/plugins/socket/SocketPlugin.java b/components/net/sf/briar/plugins/socket/SocketPlugin.java index b24fb6556dca406b4eb57b9c00d5ef19fc7e8454..b857fa866fa62cb57af8cb1203368d4d619fb8c0 100644 --- a/components/net/sf/briar/plugins/socket/SocketPlugin.java +++ b/components/net/sf/briar/plugins/socket/SocketPlugin.java @@ -8,7 +8,7 @@ import java.util.concurrent.Executor; import net.sf.briar.api.ContactId; 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.StreamTransportConnection; 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, Map<ContactId, Map<String, String>> remoteProperties, Map<String, String> config, StreamTransportCallback callback) - throws InvalidTransportException, InvalidConfigException { + throws InvalidPropertiesException, InvalidConfigException { if(started) throw new IllegalStateException(); started = true; this.localProperties = localProperties; @@ -67,14 +67,14 @@ abstract class SocketPlugin implements StreamTransportPlugin { } public synchronized void setLocalProperties(Map<String, String> properties) - throws InvalidTransportException { + throws InvalidPropertiesException { if(!started) throw new IllegalStateException(); localProperties = properties; } public synchronized void setRemoteProperties(ContactId c, Map<String, String> properties) - throws InvalidTransportException { + throws InvalidPropertiesException { if(!started) throw new IllegalStateException(); remoteProperties.put(c, properties); }