diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 22:32:10 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 22:33:06 +0100 |
commit | fe4df9517382e0afe1146926280256ef614e643d (patch) | |
tree | 949c8e6ff2f9d11d0c90bd80503249cd43ad9f50 /jsonrpc/src/main | |
parent | fc7ef2ba156db641e1d193cc2e3f1352eaa74bd8 (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.java | 10 | ||||
-rw-r--r-- | jsonrpc/src/main/java/com/orbekk/same/ConnectionManagerImpl.java | 16 |
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; + } +} |