Modified: 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Operation.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Operation.java?view=diff&rev=441743&r1=441742&r2=441743
==============================================================================
--- 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Operation.java
 (original)
+++ 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/Operation.java
 Fri Sep  8 22:05:09 2006
@@ -23,12 +23,10 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.tuscany.spi.model.DataType;
-
 /**
  * Represents an operation that is part of a service contract. The type 
paramter of this operation identifies the
  * logical type system for all data types.
- * 
+ *
  * @version $Rev$ $Date$
  */
 public class Operation<T> {
@@ -51,30 +49,36 @@
     private String dataBinding;
 
     /**
-     * Construct an operation specifying all characteristics.
-     * 
-     * @param name the name of the operation
+     * Construct a minimally-specified operation
+     *
+     * @param name       the name of the operation
+     * @param inputType  the data types of parameters passed to the operation
      * @param outputType the data type returned by the operation
-     * @param inputType the data types of parameters passed to the operation
      * @param faultTypes the data type of faults raised by the operation
-     * @param nonBlocking true if the operation is non-blocking
-     * @param dataBinding the data binding type for the operation
      */
-    public Operation(String name, DataType<List<DataType<T>>> inputType, 
DataType<T> outputType,
-            List<DataType<T>> faultTypes) {
+    public Operation(String name,
+                     DataType<List<DataType<T>>> inputType,
+                     DataType<T> outputType,
+                     List<DataType<T>> faultTypes) {
         this(name, inputType, outputType, faultTypes, true, null);
     }
 
     /**
-     * @param name
-     * @param inputType
-     * @param outputType
-     * @param faultTypes
-     * @param nonBlocking
-     * @param dataBinding
-     */
-    public Operation(final String name, final DataType<List<DataType<T>>> 
inputType, final DataType<T> outputType,
-            final List<DataType<T>> faultTypes, boolean nonBlocking, String 
dataBinding) {
+     * Construct an operation
+     *
+     * @param name        the name of the operation
+     * @param inputType   the data types of parameters passed to the operation
+     * @param outputType  the data type returned by the operation
+     * @param faultTypes  the data type of faults raised by the operation
+     * @param nonBlocking if the operation is non-blocking
+     * @param dataBinding the data-binding type required by the operation
+     */
+    public Operation(final String name,
+                     final DataType<List<DataType<T>>> inputType,
+                     final DataType<T> outputType,
+                     final List<DataType<T>> faultTypes,
+                     boolean nonBlocking,
+                     String dataBinding) {
         super();
         this.name = name;
         List<DataType<T>> types = Collections.emptyList();
@@ -83,12 +87,11 @@
         this.faultTypes = faultTypes;
         this.nonBlocking = nonBlocking;
         this.dataBinding = dataBinding;
-
     }
 
     /**
      * Returns the service contract the operation is part of.
-     * 
+     *
      * @return the service contract the operation is part of.
      */
     public ServiceContract<T> getServiceContract() {
@@ -97,7 +100,7 @@
 
     /**
      * Sets the service contract the operation is part of.
-     * 
+     *
      * @param contract the service contract the operation is part of.
      */
     public void setServiceContract(ServiceContract<T> contract) {
@@ -106,7 +109,7 @@
 
     /**
      * Returns true if the operation is part of the callback contract.
-     * 
+     *
      * @return true if the operation is part of the callback contract.
      */
     public boolean isCallback() {
@@ -115,7 +118,7 @@
 
     /**
      * Sets whether the operation is part of the callback contract.
-     * 
+     *
      * @param callback whether the operation is part of the callback contract.
      */
     public void setCallback(boolean callback) {
@@ -124,7 +127,7 @@
 
     /**
      * Returns the name of the operation.
-     * 
+     *
      * @return the name of the operation
      */
     public String getName() {
@@ -133,7 +136,7 @@
 
     /**
      * Returns the data type returned by the operation.
-     * 
+     *
      * @return the data type returned by the operation
      */
     public DataType<T> getOutputType() {
@@ -142,9 +145,9 @@
 
     /**
      * Returns the data types of the parameters passed to the operation.
-     * 
+     * <p/>
      * The inputType's logical type is a list of DataTypes which describes the 
parameter types
-     * 
+     *
      * @return the data types of the parameters passed to the operation
      */
     public DataType<List<DataType<T>>> getInputType() {
@@ -153,7 +156,7 @@
 
     /**
      * Returns the data types of the faults raised by the operation.
-     * 
+     *
      * @return the data types of the faults raised by the operation
      */
     public List<DataType<T>> getFaultTypes() {
@@ -166,7 +169,7 @@
     /**
      * Returns true if the operation is non-blocking. A non-blocking operation 
may not have completed execution at the
      * time an invocation of the operation returns.
-     * 
+     *
      * @return true if the operation is non-blocking
      */
     public boolean isNonBlocking() {
@@ -175,7 +178,7 @@
 
     /**
      * Returns the data binding type specified for the operation or null.
-     * 
+     *
      * @return the data binding type specified for the operation or null.
      */
     public String getDataBinding() {
@@ -184,7 +187,7 @@
 
     /**
      * Set the databinding for this operation
-     * 
+     *
      * @param dataBinding The databinding
      */
     public void setDataBinding(String dataBinding) {
@@ -193,7 +196,7 @@
 
     /**
      * Returns a map of metadata key to value mappings for the operation.
-     * 
+     *
      * @return a map of metadata key to value mappings for the operation.
      */
     public Map<String, Object> getMetaData() {
@@ -205,7 +208,7 @@
 
     /**
      * Adds metadata associated with the operation.
-     * 
+     *
      * @param key the metadata key
      * @param val the metadata value
      */
@@ -216,6 +219,17 @@
         metaData.put(key, val);
     }
 
+    /**
+     * Sets if the operation is non-blocking
+     */
+    public void setNonBlocking(boolean nonBlocking) {
+        this.nonBlocking = nonBlocking;
+    }
+
+    public String toString() {
+        return name;
+    }
+
     public boolean equals(Object o) {
         if (this == o) {
             return true;
@@ -245,14 +259,6 @@
         return !(outputType != null ? !outputType.equals(operation.outputType) 
: operation.outputType != null);
     }
 
-    private boolean isMappable() {
-        if (contract != null) {
-            return contract.isRemotable();
-        } else {
-            return false;
-        }
-    }
-
     public int hashCode() {
         int result;
         result = name != null ? name.hashCode() : 0;
@@ -267,14 +273,15 @@
     }
 
     /**
-     * @param nonBlocking the nonBlocking to set
+     * Returns true if the operation may be mapped to another target operation 
through an mediation
      */
-    public void setNonBlocking(boolean nonBlocking) {
-        this.nonBlocking = nonBlocking;
-    }
-    
-    public String toString() {
-        return name;
+    private boolean isMappable() {
+        if (contract != null) {
+            return contract.isRemotable();
+        } else {
+            return false;
+        }
     }
+
 
 }

Modified: 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ServiceContract.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ServiceContract.java?view=diff&rev=441743&r1=441742&r2=441743
==============================================================================
--- 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ServiceContract.java
 (original)
+++ 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/ServiceContract.java
 Fri Sep  8 22:05:09 2006
@@ -22,33 +22,21 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.tuscany.spi.model.InteractionScope;
-import org.apache.tuscany.spi.model.ModelObject;
-
 /**
  * Base class representing service contract information
- * 
+ *
  * @version $Rev$ $Date$
  */
 public abstract class ServiceContract<T> extends ModelObject {
     protected InteractionScope interactionScope;
-
     protected boolean remotable;
-
     protected Class<?> interfaceClass;
-
     protected String interfaceName;
-
     protected String callbackName;
-
     protected Class<?> callbackClass;
-
     protected Map<String, Operation<T>> operations;
-
     protected Map<String, Operation<T>> callbackOperations;
-
     protected String dataBinding;
-
     protected Map<String, Object> metaData;
 
     protected ServiceContract() {
@@ -64,7 +52,7 @@
 
     /**
      * Returns the interface name for the contract
-     * 
+     *
      * @return the interface name for the contract
      */
     public String getInterfaceName() {
@@ -107,6 +95,20 @@
     }
 
     /**
+     * @return the remotable
+     */
+    public boolean isRemotable() {
+        return remotable;
+    }
+
+    /**
+     * @param remotable the remotable to set
+     */
+    public void setRemotable(boolean remotable) {
+        this.remotable = remotable;
+    }
+
+    /**
      * Returns the name of the callback or null if the contract is 
unidirectional
      */
     public String getCallbackName() {
@@ -170,7 +172,7 @@
 
     /**
      * Returns a map of metadata key to value mappings for the operation.
-     * 
+     *
      * @return a map of metadata key to value mappings for the operation.
      */
     public Map<String, Object> getMetaData() {
@@ -182,7 +184,7 @@
 
     /**
      * Adds metadata associated with the operation.
-     * 
+     *
      * @param key the metadata key
      * @param val the metadata value
      */
@@ -207,7 +209,7 @@
             return false;
         }
         if (callbackOperations != null ? 
!callbackOperations.equals(that.callbackOperations)
-                : that.callbackOperations != null) {
+            : that.callbackOperations != null) {
             return false;
         }
         if (interfaceClass != null ? 
!interfaceClass.equals(that.interfaceClass) : that.interfaceClass != null) {
@@ -228,19 +230,5 @@
         result = 29 * result + (operations != null ? operations.hashCode() : 
0);
         result = 29 * result + (callbackOperations != null ? 
callbackOperations.hashCode() : 0);
         return result;
-    }
-
-    /**
-     * @return the remotable
-     */
-    public boolean isRemotable() {
-        return remotable;
-    }
-
-    /**
-     * @param remotable the remotable to set
-     */
-    public void setRemotable(boolean remotable) {
-        this.remotable = remotable;
     }
 }

Modified: 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/MessageId.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/MessageId.java?view=diff&rev=441743&r1=441742&r2=441743
==============================================================================
--- 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/MessageId.java
 (original)
+++ 
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/MessageId.java
 Fri Sep  8 22:05:09 2006
@@ -33,4 +33,8 @@
     public long getTimestamp() {
         return timestamp;
     }
+    
+    public String toString() {
+        return "MsgId[" + timestamp + "]";
+    }
 }

Modified: 
incubator/tuscany/java/sca/runtime/webapp-host/src/main/resources/META-INF/sca/composite.scdl
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/webapp-host/src/main/resources/META-INF/sca/composite.scdl?view=diff&rev=441743&r1=441742&r2=441743
==============================================================================
--- 
incubator/tuscany/java/sca/runtime/webapp-host/src/main/resources/META-INF/sca/composite.scdl
 (original)
+++ 
incubator/tuscany/java/sca/runtime/webapp-host/src/main/resources/META-INF/sca/composite.scdl
 Fri Sep  8 22:05:09 2006
@@ -30,6 +30,9 @@
     <component name="composite.loader">
         <system:implementation.system 
class="org.apache.tuscany.core.implementation.composite.CompositeLoader"/>
     </component>
+    <component name="composite.implementationLoader">
+        <system:implementation.system 
class="org.apache.tuscany.core.implementation.composite.ImplementationCompositeLoader"/>
+    </component>
     <component name="composite.dependencyLoader">
         <system:implementation.system 
class="org.apache.tuscany.core.implementation.composite.DependencyLoader"/>
     </component>

Modified: 
incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java?view=diff&rev=441743&r1=441742&r2=441743
==============================================================================
--- 
incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java
 (original)
+++ 
incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java
 Fri Sep  8 22:05:09 2006
@@ -33,6 +33,7 @@
 import org.apache.tuscany.spi.wire.WireService;
 
 import org.apache.tuscany.core.builder.ConnectorImpl;
+import org.apache.tuscany.core.component.WorkContextImpl;
 import org.apache.tuscany.core.idl.java.JavaInterfaceProcessorRegistryImpl;
 import org.apache.tuscany.core.wire.InboundInvocationChainImpl;
 import org.apache.tuscany.core.wire.InboundWireImpl;
@@ -57,7 +58,7 @@
     }
 
     public static WireService createWireService() {
-        return new JDKWireService();
+        return new JDKWireService(new WorkContextImpl(), null);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to