diff options
author | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-06 13:45:43 +0000 |
---|---|---|
committer | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-06 13:45:43 +0000 |
commit | 9191d70401329c8dab8d763a8fcbc3e7f08c8628 (patch) | |
tree | 3c028ebaa65ba7f100de9d53e77d57baaed83d83 /sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java | |
parent | 93f34689e75fe2b5b222b146f60ab40b3a79114f (diff) |
Add scaffolded websocket binding code using Monsoon from filesystem Maven repo.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1143410 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java b/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java new file mode 100644 index 0000000000..0023cf915d --- /dev/null +++ b/sca-java-2.x/contrib/modules/binding-websocket/src/main/java/org/apache/tuscany/sca/binding/websocket/runtime/WebsocketStash.java @@ -0,0 +1,44 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.websocket.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Simplistic static Map to share service endpoints with references
+ */
+public class WebsocketStash {
+
+ private static Map<String, WebsocketServiceInvoker> services = new HashMap<String, WebsocketServiceInvoker>();
+
+ public static void addService(String uri, WebsocketServiceInvoker WebsocketServiceInvoker) {
+ services.put(uri, WebsocketServiceInvoker);
+ }
+
+ public static WebsocketServiceInvoker getService(String uri) {
+ return services.get(uri);
+ }
+
+ public static void removeService(String uri) {
+ services.remove(uri);
+ }
+
+}
|