Author: lresende
Date: Fri Nov 11 00:53:34 2011
New Revision: 1200674
URL: http://svn.apache.org/viewvc?rev=1200674&view=rev
Log:
Tidying up comments and javadocs
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultOperationSelectorProviderFactory.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultServiceOperationSelectorInterceptor.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPRPCOperationSelectorProviderFactory.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatProviderFactory.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatServiceInterceptor.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPJSONWireFormatProviderFactory.java
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPXMLWireFormatProviderFactory.java
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultOperationSelectorProviderFactory.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultOperationSelectorProviderFactory.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultOperationSelectorProviderFactory.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultOperationSelectorProviderFactory.java
Fri Nov 11 00:53:34 2011
@@ -28,6 +28,10 @@ import org.apache.tuscany.sca.provider.O
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+/**
+ *
+ * @version $Rev$ $Date$
+*/
public class HTTPDefaultOperationSelectorProviderFactory implements
OperationSelectorProviderFactory<HTTPDefaultOperationSelector>{
public HTTPDefaultOperationSelectorProviderFactory(ExtensionPointRegistry
extensionPoints) {
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultServiceOperationSelectorInterceptor.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultServiceOperationSelectorInterceptor.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultServiceOperationSelectorInterceptor.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPDefaultServiceOperationSelectorInterceptor.java
Fri Nov 11 00:53:34 2011
@@ -33,15 +33,12 @@ import org.apache.tuscany.sca.runtime.Ru
import org.oasisopen.sca.ServiceRuntimeException;
/**
- * Sets the operation based on the request path.
+ * HTTP Binding Default operation selector, which would map
+ * http method (GET, PUT, POST, DELETE) to operations matching
+ * those name. It also supports plain servlet using 'service'
+ * to provide the component functionality.
*
- * From a url:
http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=Petra
- * where the component is HelloworldComponent and the service is Helloworld
- * the path will be "/sayHello" so the operation is "sayHello".
- *
- * TODO: we could also do something similar to how the JMS binding supports
- * a single "onMessage" method to get all requests, so perhaps this could
- * also support impls with method: service(HttpServletRequest,
HttpServletResponse)
+ * @version $Rev$ $Date$
*/
public class HTTPDefaultServiceOperationSelectorInterceptor implements
Interceptor {
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPRPCOperationSelectorProviderFactory.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPRPCOperationSelectorProviderFactory.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPRPCOperationSelectorProviderFactory.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/provider/HTTPRPCOperationSelectorProviderFactory.java
Fri Nov 11 00:53:34 2011
@@ -28,6 +28,10 @@ import org.apache.tuscany.sca.provider.O
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+/**
+ *
+ * @version $Rev$ $Date$
+*/
public class HTTPRPCOperationSelectorProviderFactory implements
OperationSelectorProviderFactory<HTTPDefaultOperationSelector>{
public HTTPRPCOperationSelectorProviderFactory(ExtensionPointRegistry
extensionPoints) {
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
Fri Nov 11 00:53:34 2011
@@ -31,6 +31,16 @@ import org.apache.tuscany.sca.invocation
import org.apache.tuscany.sca.invocation.MessageFactory;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+/**
+ * HTTP Binding service servlet, that listens to HTTP
+ * requests and dispatch to the invocation chain.
+ *
+ * The proper invocation chains and/or wireformat interceptors
+ * will properly handle selecting the right operation and
+ * handling data
+ *
+ * @version $Rev$ $Date$
+ */
public class HTTPBindingServiceServlet extends HttpServlet {
private static final long serialVersionUID = 6496710199406616194L;
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatProviderFactory.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatProviderFactory.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatProviderFactory.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatProviderFactory.java
Fri Nov 11 00:53:34 2011
@@ -29,6 +29,10 @@ import org.apache.tuscany.sca.provider.W
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+/**
+ *
+ * @version $Rev$ $Date$
+ */
public class HTTPDefaultWireFormatProviderFactory implements
WireFormatProviderFactory<HTTPDefaultWireFormat> {
public HTTPDefaultWireFormatProviderFactory(ExtensionPointRegistry
extensionPoints) {
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatServiceInterceptor.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatServiceInterceptor.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatServiceInterceptor.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPDefaultWireFormatServiceInterceptor.java
Fri Nov 11 00:53:34 2011
@@ -19,7 +19,6 @@
package org.apache.tuscany.sca.binding.http.wireformat.provider;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
import org.apache.tuscany.sca.common.http.HTTPContext;
import org.apache.tuscany.sca.invocation.Interceptor;
import org.apache.tuscany.sca.invocation.Invoker;
@@ -28,27 +27,15 @@ import org.apache.tuscany.sca.runtime.Ru
/**
* Handles the default wire format for the http binding
- *
- * 1- determine the request and response format (xml, json, etc) from the
- * binding config or content type header and accept headers
- * - TODO: need a way to configure the databinding framework based on that
format
- * 2- get the request contents from the HttpServletRequest
- * - for a post its just the request body
- * - for a get need to convert the query string into a body based on the
format (xml, json, etc)
- * 3- send the request on down the wire
- * 4- set the response contents in the HttpServletResponse
- * (the databinding should already have put it in the correct format)
+ * by passing the HTTP request and response down to the
+ * actual component implementation that is a servlet.
*
*/
public class HTTPDefaultWireFormatServiceInterceptor implements Interceptor {
-
- private RuntimeEndpoint endpoint;
- private HTTPBinding binding;
private Invoker next;
public HTTPDefaultWireFormatServiceInterceptor(RuntimeEndpoint endpoint) {
- this.endpoint = endpoint;
- this.binding = (HTTPBinding) endpoint.getBinding();
+
}
@Override
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPJSONWireFormatProviderFactory.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPJSONWireFormatProviderFactory.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPJSONWireFormatProviderFactory.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPJSONWireFormatProviderFactory.java
Fri Nov 11 00:53:34 2011
@@ -29,6 +29,10 @@ import org.apache.tuscany.sca.provider.W
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+/**
+ *
+ * @version $Rev$ $Date$
+ */
public class HTTPJSONWireFormatProviderFactory implements
WireFormatProviderFactory<HTTPJSONWireFormat> {
public HTTPJSONWireFormatProviderFactory(ExtensionPointRegistry
extensionPoints) {
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPXMLWireFormatProviderFactory.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPXMLWireFormatProviderFactory.java?rev=1200674&r1=1200673&r2=1200674&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPXMLWireFormatProviderFactory.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/provider/HTTPXMLWireFormatProviderFactory.java
Fri Nov 11 00:53:34 2011
@@ -31,6 +31,10 @@ import org.apache.tuscany.sca.provider.W
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+/**
+ *
+ * @version $Rev$ $Date$
+ */
public class HTTPXMLWireFormatProviderFactory implements
WireFormatProviderFactory<HTTPXMLWireFormat> {
private DOMHelper domHelper;