diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-16 08:03:50 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-16 08:03:50 +0000 |
commit | c148dc21980189096868c5d8edd05040b90dd68d (patch) | |
tree | ce371450cabc3b9c567db7c94d092c8104edab7b /java/sca/modules/node-api/src | |
parent | 1c2b666f894bbbeecd823fce65319ea6e6f9cc2e (diff) |
Decouple node-impl from sca-client-impl
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775426 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-api/src')
2 files changed, 43 insertions, 1 deletions
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFinder.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFinder.java new file mode 100644 index 0000000000..f81906af89 --- /dev/null +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFinder.java @@ -0,0 +1,42 @@ +/*
+ * 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.node;
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
+public class NodeFinder {
+
+ private static Map<URI, Node> nodes = new HashMap<URI, Node>();
+
+ public static void addNode(URI domainName, Node node) {
+ nodes.put(domainName, node);
+ }
+
+ public static Node removeNode(URI domainName) {
+ return nodes.remove(domainName);
+ }
+
+ public static Node getNode(URI domainURI) {
+ return nodes.get(domainURI);
+ }
+
+}
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/NodeConfigurationImpl.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/NodeConfigurationImpl.java index e9bd791f96..867e46ee75 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/NodeConfigurationImpl.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/configuration/impl/NodeConfigurationImpl.java @@ -37,7 +37,7 @@ import org.apache.tuscany.sca.node.configuration.NodeConfiguration; */
public class NodeConfigurationImpl implements NodeConfiguration {
private String uri;
- private String domainURI;
+ private String domainURI = "default";
private List<ContributionConfiguration> contributions = new ArrayList<ContributionConfiguration>();
private List<BindingConfiguration> bindings = new ArrayList<BindingConfiguration>();
|