You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2006/02/10 21:38:38 UTC

svn commit: r376833 - in /incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context: AutowireContext.java ConfigurationContext.java

Author: jboynes
Date: Fri Feb 10 12:38:36 2006
New Revision: 376833

URL: http://svn.apache.org/viewcvs?rev=376833&view=rev
Log:
javadoc for some context interfaces

Modified:
    incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/AutowireContext.java
    incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/ConfigurationContext.java

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/AutowireContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/AutowireContext.java?rev=376833&r1=376832&r2=376833&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/AutowireContext.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/AutowireContext.java Fri Feb 10 12:38:36 2006
@@ -14,17 +14,22 @@
 package org.apache.tuscany.core.context;
 
 /**
- * A context that offers automatic wiring capabilities
- * 
+ * A specialization of an AggregateContext that is able to automatically resolve references
+ * for its children using EntryPoint or Service interfaces exposed by it or, recursively, any
+ * of it parents.
+ *
  * @version $Rev$ $Date$
  */
-public interface AutowireContext extends AggregateContext{
+public interface AutowireContext extends AggregateContext {
 
     /**
-     * Returns an instance of the given type
-     * 
+     * Returns an reference to the requested service.
+     *
+     * @param instanceInterface the type of service being requested
+     * @return a reference to the requested service or null if none can be found
      * @throws AutowireResolutionException if an error occurs attempting to resolve an autowire
      */
-    <T> T resolveInstance(Class<T> instanceInterace) throws AutowireResolutionException;
+    <T> T resolveInstance(Class<T> instanceInterface) throws AutowireResolutionException;
 
+    // todo add additional methods that allow other qualifications to be supplied
 }

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/ConfigurationContext.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/ConfigurationContext.java?rev=376833&r1=376832&r2=376833&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/ConfigurationContext.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/ConfigurationContext.java Fri Feb 10 12:38:36 2006
@@ -18,24 +18,31 @@
 import org.apache.tuscany.model.assembly.ExtensibleModelObject;
 
 /**
- * Offers configuration services in the runtime. Configuration contexts will typically be hierarchical, delegating to
- * their parent <b>after</b> performing an operation.
- * 
+ * Offers configuration services in the runtime.
+ * A ConfigurationContext is able to configure a model and then build the runtime representation corresponding
+ * to that model in the live system.
+ * <p/>
+ * Configuration contexts will typically be hierarchical, delegating to their parent <b>after</b> performing an operation.
+ * The parent ConfigurationContext will typically be injected into an implementation of this interface during registration.
+ *
  * @version $Rev$ $Date$
  */
 public interface ConfigurationContext {
 
     /**
-     * Adds additional configuration information to a model object
-     * @param part
+     * Adds additional configuration information to a model object.
+     *
+     * @param model the model object to be configured
      * @throws ConfigurationException
      */
     public void configure(ExtensibleModelObject model) throws ConfigurationException;
 
     /**
-     * Decorates the model with runtime configurations
-     * @param parent the parent context of the model object being built
-     * @param part
+     * Decorates the supplied model object with a {@link org.apache.tuscany.core.builder.RuntimeConfiguration}
+     * that can be used to create the runtime context corresponding to the model.
+     *
+     * @param parent an AggregrateContext that will ultimately become the parent of the runtime context
+     * @param model  the model object that defines the configuration to be built
      * @throws BuilderConfigException
      * @see org.apache.tuscany.core.builder.RuntimeConfiguration
      */