summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java)30
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java)18
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java)6
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java)20
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java (renamed from sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java)6
5 files changed, 40 insertions, 40 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
index 3e8e396927..5739fbea77 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
import java.io.InputStream;
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.http.HTTPCacheContext;
+import org.apache.tuscany.sca.binding.rest.RESTCacheContext;
import org.apache.tuscany.sca.common.http.HTTPContentTypeMapper;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.Message;
@@ -43,7 +43,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingListenerServlet extends HttpServlet {
+public class RESTBindingListenerServlet extends HttpServlet {
private static final long serialVersionUID = 2865466417329430610L;
transient private Binding binding;
@@ -59,9 +59,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
private Invoker conditionalDeleteInvoker;
/**
- * Constructs a new HTTPServiceListenerServlet.
+ * Constructs a new RESTServiceListenerServlet.
*/
- public HTTPBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
+ public RESTBindingListenerServlet(Binding binding, MessageFactory messageFactory) {
this.binding = binding;
this.messageFactory = messageFactory;
}
@@ -89,9 +89,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -163,9 +163,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -229,9 +229,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -295,9 +295,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
// String id = path.substring(1);
Message responseMessage = null;
- HTTPCacheContext cacheContext = null;
+ RESTCacheContext cacheContext = null;
try {
- cacheContext = HTTPCacheContext.getCacheContextFromRequest(request);
+ cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -333,9 +333,9 @@ public class HTTPBindingListenerServlet extends HttpServlet {
// Test if the ETag and LastModified are returned as a cache context.
Object body = responseMessage.getBody();
- if ( body.getClass() == HTTPCacheContext.class ) {
+ if ( body.getClass() == RESTCacheContext.class ) {
// Transfer to header if so.
- HTTPCacheContext cc = (HTTPCacheContext)responseMessage.getBody();
+ RESTCacheContext cc = (RESTCacheContext)responseMessage.getBody();
if (( cc != null ) && ( cc.isEnabled() )) {
String eTag = cc.getETag();
if ( eTag != null )
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java
index 118a2c3bc4..23012f4a6b 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingProviderFactory.java
@@ -17,9 +17,9 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
@@ -33,16 +33,16 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
/**
- * Factory for HTTP binding providers.
+ * Factory for REST binding providers.
*
* @version $Rev$ $Date$
*/
-public class HTTPBindingProviderFactory implements BindingProviderFactory<HTTPBinding> {
+public class RESTBindingProviderFactory implements BindingProviderFactory<RESTBinding> {
private ExtensionPointRegistry extensionPoints;
private MessageFactory messageFactory;
private ServletHost servletHost;
- public HTTPBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ public RESTBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
this.servletHost = ServletHostHelper.getServletHost(extensionPoints);
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
@@ -50,15 +50,15 @@ public class HTTPBindingProviderFactory implements BindingProviderFactory<HTTPBi
}
public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) {
- // Binding HTTP is currently NOT supporting References
+ // Binding REST is currently NOT supporting References
return null;
}
public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
- return new HTTPServiceBindingProvider(endpoint, extensionPoints, messageFactory, servletHost);
+ return new RESTServiceBindingProvider(endpoint, extensionPoints, messageFactory, servletHost);
}
- public Class<HTTPBinding> getModelType() {
- return HTTPBinding.class;
+ public Class<RESTBinding> getModelType() {
+ return RESTBinding.class;
}
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java
index e20d420d49..b08fa4b201 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTGetListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
import java.io.InputStream;
@@ -39,7 +39,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPGetListenerServlet extends HttpServlet {
+public class RESTGetListenerServlet extends HttpServlet {
private static final long serialVersionUID = 2865466417329430610L;
private MessageFactory messageFactory;
@@ -48,7 +48,7 @@ public class HTTPGetListenerServlet extends HttpServlet {
/**
* Constructs a new HTTPServiceListenerServlet.
*/
- public HTTPGetListenerServlet(Invoker getInvoker, MessageFactory messageFactory) {
+ public RESTGetListenerServlet(Invoker getInvoker, MessageFactory messageFactory) {
this.getInvoker = getInvoker;
this.messageFactory = messageFactory;
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java
index 41981d2db5..e70aed8680 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import javax.servlet.Servlet;
-import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.binding.rest.RESTBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -45,14 +45,14 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
*
* @version $Rev$ $Date$
*/
-public class HTTPServiceBindingProvider implements EndpointProvider {
+public class RESTServiceBindingProvider implements EndpointProvider {
private ExtensionPointRegistry extensionPoints;
private RuntimeEndpoint endpoint;
private RuntimeComponent component;
private RuntimeComponentService service;
private InterfaceContract serviceContract;
- private HTTPBinding binding;
+ private RESTBinding binding;
private MessageFactory messageFactory;
private OperationSelectorProvider osProvider;
@@ -60,9 +60,9 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
private ServletHost servletHost;
private String servletMapping;
- private HTTPBindingListenerServlet bindingListenerServlet;
+ private RESTBindingListenerServlet bindingListenerServlet;
- public HTTPServiceBindingProvider(RuntimeEndpoint endpoint,
+ public RESTServiceBindingProvider(RuntimeEndpoint endpoint,
ExtensionPointRegistry extensionPoints,
MessageFactory messageFactory,
ServletHost servletHost) {
@@ -70,7 +70,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
this.endpoint = endpoint;
this.component = (RuntimeComponent)endpoint.getComponent();
this.service = (RuntimeComponentService)endpoint.getService();
- this.binding = (HTTPBinding)endpoint.getBinding();
+ this.binding = (RESTBinding)endpoint.getBinding();
this.extensionPoints = extensionPoints;
this.messageFactory = messageFactory;
@@ -116,7 +116,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
public void start() {
// Get the invokers for the supported operations
Servlet servlet = null;
- bindingListenerServlet = new HTTPBindingListenerServlet(binding, messageFactory );
+ bindingListenerServlet = new RESTBindingListenerServlet(binding, messageFactory );
for (InvocationChain invocationChain : endpoint.getInvocationChains()) {
Operation operation = invocationChain.getTargetOperation();
String operationName = operation.getName();
@@ -154,7 +154,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
servlet = bindingListenerServlet;
} else if (operationName.equals("service")) {
Invoker serviceInvoker = invocationChain.getHeadInvoker();
- servlet = new HTTPServiceListenerServlet(binding, serviceInvoker, messageFactory);
+ servlet = new RESTServiceListenerServlet(binding, serviceInvoker, messageFactory);
break;
}
}
@@ -189,7 +189,7 @@ public class HTTPServiceBindingProvider implements EndpointProvider {
}
/**
- * Add specific http interceptor to invocation chain
+ * Add specific rest interceptor to invocation chain
*/
public void configure() {
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java
index f752dce3e1..183a0e599b 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceListenerServlet.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.binding.http.provider;
+package org.apache.tuscany.sca.binding.rest.provider;
import java.io.IOException;
@@ -39,7 +39,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
*
* @version $Rev$ $Date$
*/
-public class HTTPServiceListenerServlet implements Servlet {
+public class RESTServiceListenerServlet implements Servlet {
transient private Binding binding;
transient private ServletConfig config;
transient private MessageFactory messageFactory;
@@ -48,7 +48,7 @@ public class HTTPServiceListenerServlet implements Servlet {
/**
* Constructs a new HTTPServiceListenerServlet.
*/
- public HTTPServiceListenerServlet(Binding binding, Invoker serviceInvoker, MessageFactory messageFactory) {
+ public RESTServiceListenerServlet(Binding binding, Invoker serviceInvoker, MessageFactory messageFactory) {
this.binding = binding;
this.serviceInvoker = serviceInvoker;
this.messageFactory = messageFactory;