summaryrefslogtreecommitdiff
path: root/jsonrpc/src/main
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-10 22:32:10 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-10 22:33:06 +0100
commitfe4df9517382e0afe1146926280256ef614e643d (patch)
tree949c8e6ff2f9d11d0c90bd80503249cd43ad9f50 /jsonrpc/src/main
parentfc7ef2ba156db641e1d193cc2e3f1352eaa74bd8 (diff)
Add ConnectionManager interface.
The ConnectionManager will be used by SameState to communicate with other participants.
Diffstat (limited to 'jsonrpc/src/main')
-rw-r--r--jsonrpc/src/main/java/com/orbekk/same/ConnectionManager.java10
-rw-r--r--jsonrpc/src/main/java/com/orbekk/same/ConnectionManagerImpl.java16
2 files changed, 26 insertions, 0 deletions
diff --git a/jsonrpc/src/main/java/com/orbekk/same/ConnectionManager.java b/jsonrpc/src/main/java/com/orbekk/same/ConnectionManager.java
new file mode 100644
index 0000000..985f6f0
--- /dev/null
+++ b/jsonrpc/src/main/java/com/orbekk/same/ConnectionManager.java
@@ -0,0 +1,10 @@
+package com.orbekk.same;
+
+/**
+ * An interface that returns a connection for a participant.
+ *
+ * When testing, this interface can be mocked to use local participants only.
+ */
+public interface ConnectionManager {
+ SameService getConnection(String url);
+}
diff --git a/jsonrpc/src/main/java/com/orbekk/same/ConnectionManagerImpl.java b/jsonrpc/src/main/java/com/orbekk/same/ConnectionManagerImpl.java
new file mode 100644
index 0000000..e3a6928
--- /dev/null
+++ b/jsonrpc/src/main/java/com/orbekk/same/ConnectionManagerImpl.java
@@ -0,0 +1,16 @@
+package com.orbekk.same;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConnectionManagerImpl {
+ private Logger logger = LoggerFactory.getLogger(getClass());
+
+ public ConnectionManagerImpl() {
+ }
+
+ SameService getConnection(String url) {
+ // TODO: Implement this class.
+ return null;
+ }
+}