Better solution for setting the context. The context is now known as soon as componen...
[utils] / system / general / src / main / java / org / wamblee / system / Component.java
index 4083c5bd6fc9e28f2e4b04e096e659d06b5d0d9b..e06532669ce5a49c179fc5d54c0214c9b5e20d45 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2007 the original author or authors.
+ * 
+ * Licensed 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.wamblee.system;
 
 /**
@@ -23,6 +38,19 @@ public interface Component {
         * @return Subsystem name. 
         */
        String getName();
+       
+       /**
+        * Prepends the context with a super context. 
+        */
+       void addContext(String aContext);
+       
+       /**
+        * Gets the fully qualified name of the component which includes
+        * the context of the component.  
+        * This method can only be used after the component has started.
+        * @return Qualified name. 
+        */
+       String getQualifiedName(); 
 
        /**
         * Gets a description of the provided interfaces. 
@@ -40,9 +68,8 @@ public interface Component {
        /**
         * Initialises the subsytem by starting all the services that
         * it described as provided. 
-        * @param aContext Unique name for the subsystem.  
         */
-       void start(String aContext);
+       void start();
        
        /**
         * Stops a subsystem.