diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/manager/CometEndpointManager.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/manager/CometEndpointManager.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/manager/CometEndpointManager.java b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/manager/CometEndpointManager.java new file mode 100644 index 0000000000..9fe0353f03 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/manager/CometEndpointManager.java @@ -0,0 +1,30 @@ +package org.apache.tuscany.sca.binding.comet.runtime.manager; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class CometEndpointManager { + + private static final ConcurrentMap<String, RuntimeEndpoint> endpoints = new ConcurrentHashMap<String, RuntimeEndpoint>(); + + private CometEndpointManager() { + } + + public static void add(String url, RuntimeEndpoint endpoint) { + endpoints.put(url, endpoint); + } + + public static RuntimeEndpoint get(String url) { + return endpoints.get(url); + } + + public static void remove(String url) { + endpoints.remove(url); + } + + public static void clear() { + endpoints.clear(); + } +} |