diff options
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>();
|