summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-30 20:44:28 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-30 20:44:28 +0000
commitf8dee028695c57d27ddfc59936d073cfccaa1d4b (patch)
treedbc5f64055e28eabf9d8f61d5731ddb186bdd0c6 /sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java
parent95e2233ee7c33168a6c33a98d63a12ca35a6500f (diff)
Updating REST binding to use common-http cache context class and minor update to HTTPCacheContext factory method
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@939810 13f79535-47bb-0310-9956-ffa450edef68
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.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
index cb65d74293..b91c6d7f6d 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingListenerServlet.java
@@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.rest.RESTCacheContext;
+import org.apache.tuscany.sca.common.http.HTTPCacheContext;
import org.apache.tuscany.sca.common.http.HTTPContentTypeMapper;
import org.apache.tuscany.sca.common.http.HTTPContext;
import org.apache.tuscany.sca.invocation.Invoker;
@@ -148,9 +148,9 @@ public class RESTBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- RESTCacheContext cacheContext = null;
+ HTTPCacheContext cacheContext = null;
try {
- cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
+ cacheContext = HTTPCacheContext.createCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -238,9 +238,9 @@ public class RESTBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- RESTCacheContext cacheContext = null;
+ HTTPCacheContext cacheContext = null;
try {
- cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
+ cacheContext = HTTPCacheContext.createCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -304,9 +304,9 @@ public class RESTBindingListenerServlet extends HttpServlet {
String id = path.substring(1);
Message responseMessage = null;
- RESTCacheContext cacheContext = null;
+ HTTPCacheContext cacheContext = null;
try {
- cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
+ cacheContext = HTTPCacheContext.createCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -370,9 +370,9 @@ public class RESTBindingListenerServlet extends HttpServlet {
// String id = path.substring(1);
Message responseMessage = null;
- RESTCacheContext cacheContext = null;
+ HTTPCacheContext cacheContext = null;
try {
- cacheContext = RESTCacheContext.getCacheContextFromRequest(request);
+ cacheContext = HTTPCacheContext.createCacheContextFromRequest(request);
} catch (ParseException e) {
}
@@ -408,9 +408,9 @@ public class RESTBindingListenerServlet extends HttpServlet {
// Test if the ETag and LastModified are returned as a cache context.
Object body = responseMessage.getBody();
- if ( body.getClass() == RESTCacheContext.class ) {
+ if ( body.getClass() == HTTPCacheContext.class ) {
// Transfer to header if so.
- RESTCacheContext cc = (RESTCacheContext)responseMessage.getBody();
+ HTTPCacheContext cc = (HTTPCacheContext)responseMessage.getBody();
if (( cc != null ) && ( cc.isEnabled() )) {
String eTag = cc.getETag();
if ( eTag != null )