diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-03-02 14:32:01 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-03-02 14:35:52 +0100 |
commit | 0ac19e55b447e9bc966282e1ba9cae9f23ae4f91 (patch) | |
tree | 4aaab6159bb0ace904af76f3d797aec6b273cd6f | |
parent | 5fb1fa01e75b2d47aad321f00fb28ea2c4478a8f (diff) |
Rename Discovery* => Directory*.
-rw-r--r-- | directory/pom.xml (renamed from discovery/pom.xml) | 2 | ||||
-rw-r--r-- | directory/src/main/java/com/orbekk/same/directory/DirectoryApp.java (renamed from discovery/src/main/java/com/orbekk/same/discovery/DiscoveryApp.java) | 4 | ||||
-rw-r--r-- | directory/src/main/java/com/orbekk/same/directory/DirectoryServiceImpl.java (renamed from discovery/src/main/java/com/orbekk/same/discovery/DiscoveryServiceImpl.java) | 6 | ||||
-rw-r--r-- | directory/src/main/java/com/orbekk/same/directory/NetworkEntry.java (renamed from discovery/src/main/java/com/orbekk/same/discovery/NetworkEntry.java) | 2 | ||||
-rw-r--r-- | directory/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java (renamed from discovery/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java) | 2 | ||||
-rw-r--r-- | discovery/src/main/java/com/orbekk/same/discovery/DiscoveryService.java | 22 |
6 files changed, 10 insertions, 28 deletions
diff --git a/discovery/pom.xml b/directory/pom.xml index 92cbc94..b8d11f2 100644 --- a/discovery/pom.xml +++ b/directory/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>com.orbekk.same.discovery</groupId> + <groupId>com.orbekk.same.directory</groupId> <artifactId>discovery-server</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> diff --git a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryApp.java b/directory/src/main/java/com/orbekk/same/directory/DirectoryApp.java index dbad697..f142f18 100644 --- a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryApp.java +++ b/directory/src/main/java/com/orbekk/same/directory/DirectoryApp.java @@ -1,8 +1,8 @@ -package com.orbekk.same.discovery; +package com.orbekk.same.directory; import com.orbekk.same.http.ServerContainer; -public class DiscoveryApp { +public class DirectoryApp { public static final int DISCOVERY_PORT = 15072; public static void main(String[] args) { diff --git a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryServiceImpl.java b/directory/src/main/java/com/orbekk/same/directory/DirectoryServiceImpl.java index fe97228..8c6c6b9 100644 --- a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryServiceImpl.java +++ b/directory/src/main/java/com/orbekk/same/directory/DirectoryServiceImpl.java @@ -1,10 +1,12 @@ -package com.orbekk.same.discovery; +package com.orbekk.same.directory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -public class DiscoveryServiceImpl implements DiscoveryService { +import com.orbekk.same.discovery.DirectoryService; + +public class DirectoryServiceImpl implements DirectoryService { public final static long EXPIRE_TIME = 15 * 60l * 1000; // 15 minutes List<NetworkEntry> networkList = new ArrayList<NetworkEntry>(); diff --git a/discovery/src/main/java/com/orbekk/same/discovery/NetworkEntry.java b/directory/src/main/java/com/orbekk/same/directory/NetworkEntry.java index 11c7f90..cac21cc 100644 --- a/discovery/src/main/java/com/orbekk/same/discovery/NetworkEntry.java +++ b/directory/src/main/java/com/orbekk/same/directory/NetworkEntry.java @@ -1,4 +1,4 @@ -package com.orbekk.same.discovery; +package com.orbekk.same.directory; public class NetworkEntry { public String networkName; diff --git a/discovery/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java b/directory/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java index dacaf9c..455de90 100644 --- a/discovery/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java +++ b/directory/src/test/java/com/orbekk/same/discovery/NetworkEntryTest.java @@ -4,6 +4,8 @@ import static org.junit.Assert.*; import org.junit.Test; +import com.orbekk.same.directory.NetworkEntry; + public class NetworkEntryTest { @Test public void testExpiry() { diff --git a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryService.java b/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryService.java deleted file mode 100644 index 04fdab0..0000000 --- a/discovery/src/main/java/com/orbekk/same/discovery/DiscoveryService.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.orbekk.same.discovery; - -import java.util.List; - -/** - * Maintains a registry of available networks. - * - * The discovery service is only meant to be used for debugging. - */ -public interface DiscoveryService { - /** - * Returns a list of network names and master urls interleaved, i.e., - * - * [NetworkName1, MasterUrl1, ...] - */ - List<String> getNetworks() throws Exception; - - /** - * Register a network. - */ - void registerNetwork(String networkName, String masterUrl) throws Exception; -} |