You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2007/07/27 15:30:36 UTC
svn commit: r560222 -
/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/
Author: slaws
Date: Fri Jul 27 06:30:34 2007
New Revision: 560222
URL: http://svn.apache.org/viewvc?view=rev&rev=560222
Log:
First pass at the interfaces for the dynamic configuration of the distributed domain
Added:
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/BaseUriMap.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentManager.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentMap.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ContributionManager.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DistributedDomainManager.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DomainNodeManager.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/NodeManager.java
incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/BaseUriMap.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/BaseUriMap.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/BaseUriMap.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/BaseUriMap.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,53 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * Represents the mapping between protocols and baseuris for a given domain
+ * on a node
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface BaseUriMap {
+
+ /**
+ * Sets the name of the node that is responsible for running
+ * the named component
+ *
+ * @param domainUri the string uri for the parent domain
+ * @param nodeUri the string uri for the node where the component will run
+ * @Param protocol the protocol that the uri represent, e.g. http or https
+ */
+ public void setBaseUri(String domainUri, String nodeUri, String protocol, String uri);
+
+ /**
+ * Sets the name of the node that is responsible for running
+ * the named component
+ *
+ * @param domainUri the string uri for the parent domain
+ * @param nodeUri the string uri for the node where the component will run
+ * @Param protocol the protocol that the uri represent, e.g. http or https
+ */
+ public String getBaseUri(String domainUri, String nodeUri, String protocol);
+
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentManager.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentManager.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,55 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * A management interface for components in the distributed domain
+ *
+ * TODO - a minimum interface and closely related to
+ * o.a.t.s.host.embedded.management.ComponentManager
+ * so we need to see how this works out
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface ComponentManager {
+
+ /**
+ * Starts a named component
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the node
+ * @param componentName the name of the component to be started
+ */
+ public void startComponent(String domainUri, String nodeUri, String componentName);
+
+
+ /**
+ * Stops a named component
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the node
+ * @param componentName the name of the component to be started
+ */
+ public void stopComponent(String domainUri, String nodeUri, String componentName);
+
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentMap.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentMap.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentMap.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ComponentMap.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,60 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * Represents the mapping between components and runtime nodes.
+ *
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface ComponentMap {
+
+ /**
+ * Sets the name of the node that is responsible for running
+ * the named component
+ *
+ * @param domainUri the string uri for the parent domain
+ * @param nodeUri the string uri for the node where the component will run
+ * @param componentName the string name for the component of interest
+ */
+ public void addComponent(String domainUri, String nodeUri, String componentName );
+
+ /**
+ * Removes the named component from the map
+ *
+ * @param domainUri the string uri for the parent domain
+ * @param nodeUri the string uri for the node where the component will run
+ * @param componentName the string name for the component of interest
+ */
+ public void removeComponent(String domainUri, String nodeUri, String componentName);
+
+ /**
+ * Return the names of all components that will run on the specified node
+ *
+ * @param domainUri the string uri for the parent domain
+ * @param nodeUri the string uri for the node where the component will run
+ * @return
+ */
+ public List<String> getComponentsForNode(String domainUri, String nodeUri);
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ContributionManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ContributionManager.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ContributionManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ContributionManager.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,53 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * A management interface for contributions in the distributed domain
+ *
+ * TODO - it's not clear what the level of granularity of contribution updates
+ * will be finaly in Tuscany as this aspect is still being implemented
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface ContributionManager {
+
+ /**
+ * Accepts a new contribution and passes it onto the domain implementation
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the node
+ * @param contributionUri the string uri for the contribution to be added
+ */
+ public void addContribution(String domainUri, String nodeUri, String contributionUri);
+
+ /**
+ * Removes the specified contribution from the domain
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the node
+ * @param contributionUri the string uri for the contribution to be removed
+ */
+ public void removeContribution(String domainUri, String nodeUri, String contributionUri);
+
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DistributedDomainManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DistributedDomainManager.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DistributedDomainManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DistributedDomainManager.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,59 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * The management interface for distributed domain. This is resposible for
+ * creating appropriate configuration on all the nodes that are running
+ * domain nodes for the distributed domain.
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface DistributedDomainManager {
+
+ /**
+ * A node registers with the distributed domain manager. The mechanism wherby this
+ * registration interface is discovered is not defined. For example, JMS, JINI
+ * or a hardcoded configuration could all be candidates in the java world.
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ * @param nodeManagementUrl the endpoint for the nodes management service
+ */
+ public void registerNode(String domainUri, String nodeUri, String nodeManagementUrl);
+
+ /**
+ * Retrieve the configuration for the specified node. The return type is interesting
+ * here. There are many ways in which all of the information that comprises a
+ * configuration can be provisioned onto a node, for example, shared file system,
+ * ftp, http. The return value is the url of where to look for the configuration
+ * information. From a management point of view it is convenient to maintain all
+ * current and previous node configurations. This can easily be achieved by providing
+ * a different URL each time the onfiguration is changed.
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ * @return the URL from where the configuration can be retrieved
+ */
+ public String getDomainNodeConfiguration(String domainUri, String nodeUri);
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DomainNodeManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DomainNodeManager.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DomainNodeManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/DomainNodeManager.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,58 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * The management interface for the part of the distributed domain that
+ * runs on a node
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface DomainNodeManager {
+
+ /**
+ * Creates the internal structures to represent the distributed domain on this
+ * node
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ */
+ public void createDomainNode(String domainUri, String nodeUri);
+
+ /**
+ * Starts the domain running on the current node
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ */
+ public void startDomainNode(String domainUri, String nodeUri);
+
+ /**
+ * Stops the running domain on the current node
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ */
+ public void stopDomainNode(String domainUri, String nodeUri);
+
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/NodeManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/NodeManager.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/NodeManager.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/NodeManager.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,63 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * The management interface for a node
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface NodeManager {
+
+ /**
+ * Starts the node and assigns a uri to the node. For covenience this
+ * uri should be the URL of the service that provides this interface
+ *
+ * @param nodeUri the string uri for the current node
+ */
+ public void start(String nodeUri);
+
+ /**
+ * Starts the node running
+ *
+ */
+ public void stop();
+
+ /**
+ * The node joins the distributed domain specified by the
+ * domainUri.
+ *
+ * @param domainUri the string uri for the distributed domain
+ */
+ public void joinDomain(String domainUri);
+
+ /**
+ * The configuration of a domain running on this node has changed.
+ * It is the responsibility of the node to respond to this and retrieve
+ * any relevent configuration changes
+ *
+ * @param domainUri the string uri for the distributed domain
+ */
+ public void domainNodeConfigurationChange(String domainUri);
+
+}
Added: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java?view=auto&rev=560222
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java (added)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java Fri Jul 27 06:30:34 2007
@@ -0,0 +1,52 @@
+/*
+ * 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.distributed.management;
+
+import java.util.List;
+
+
+/**
+ * Provides a mechanism whereby service enpoints can be shared amongst the
+ * nodes of a distributed domain.
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public interface ServiceDiscovery {
+
+ /**
+ * Accepts information about a service endpoint and holds onto it
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ * @param serviceName the name of the service that is exposed and the provided endpoint
+ * @param url the enpoint url
+ */
+ public void registerServiceEndpoint(String domainUri, String nodeUri, String serviceName, String URL);
+
+ /**
+ * Locates information about a service endpoint
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param serviceName the name of the service that is exposed and the provided endpoint
+ * @return url
+ */
+ public String registerServiceEndpoint(String domainUri, String serviceName);
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org