camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r761332 - in /camel/trunk/components: camel-http/src/main/java/org/apache/camel/component/http/ camel-jetty/src/test/java/org/apache/camel/component/jetty/
Date Thu, 02 Apr 2009 16:08:11 GMT
Author: davsclaus
Date: Thu Apr  2 16:08:10 2009
New Revision: 761332

URL: http://svn.apache.org/viewvc?rev=761332&view=rev
Log:
CAMEL-1513: renamed option.

Modified:
    camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
    camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
    camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
    camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySimplifiedHandle404Test.java

Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java?rev=761332&r1=761331&r2=761332&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
(original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
Thu Apr  2 16:08:10 2009
@@ -102,7 +102,7 @@
         configureParameters(parameters);
 
         // should we use an exception for failed error codes?
-        Boolean throwException = getAndRemoveParameter(parameters, "throwException", Boolean.class);
+        Boolean throwExceptionOnFailure = getAndRemoveParameter(parameters, "throwExceptionOnFailure",
Boolean.class);
 
         // restructure uri to be based on the parameters left as we dont want to include
the Camel internal options
         URI httpUri = URISupport.createRemainingURI(new URI(uri), parameters);
@@ -122,8 +122,8 @@
         if (httpBinding != null) {
             endpoint.setBinding(httpBinding);
         }
-        if (throwException != null) {
-            endpoint.setThrowException(throwException);
+        if (throwExceptionOnFailure != null) {
+            endpoint.setThrowExceptionOnFailure(throwExceptionOnFailure);
         }
         return endpoint;
     }

Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java?rev=761332&r1=761331&r2=761332&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
(original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
Thu Apr  2 16:08:10 2009
@@ -49,7 +49,7 @@
     private HttpClientParams clientParams;
     private HttpClientConfigurer httpClientConfigurer;
     private HttpConnectionManager httpConnectionManager;
-    private boolean throwException = true;
+    private boolean throwExceptionOnFailure = true;
 
     public HttpEndpoint() {
     }
@@ -205,11 +205,11 @@
         this.headerFilterStrategy = headerFilterStrategy;
     }
 
-    public boolean isThrowException() {
-        return throwException;
+    public boolean isThrowExceptionOnFailure() {
+        return throwExceptionOnFailure;
     }
 
-    public void setThrowException(boolean throwException) {
-        this.throwException = throwException;
+    public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure) {
+        this.throwExceptionOnFailure = throwExceptionOnFailure;
     }
 }

Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=761332&r1=761331&r2=761332&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
(original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Thu Apr  2 16:08:10 2009
@@ -49,7 +49,7 @@
     public HttpProducer(HttpEndpoint endpoint) {
         super(endpoint);
         this.httpClient = endpoint.createHttpClient();
-        this.throwException = endpoint.isThrowException();
+        this.throwException = endpoint.isThrowExceptionOnFailure();
     }
 
     public void process(Exchange exchange) throws Exception {

Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySimplifiedHandle404Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySimplifiedHandle404Test.java?rev=761332&r1=761331&r2=761332&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySimplifiedHandle404Test.java
(original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySimplifiedHandle404Test.java
Thu Apr  2 16:08:10 2009
@@ -50,11 +50,11 @@
                 errorHandler(noErrorHandler());
 
                 // START SNIPPET: e1
-                // We set throwException to false to let Camel return any response from the
remove HTTP server without thrown
+                // We set throwExceptionOnFailure to false to let Camel return any response
from the remove HTTP server without thrown
                 // HttpOperationFailedException in case of failures.
                 // This allows us to handle all responses in the aggregation strategy where
we can check the HTTP response code
                 // and decide what to do. As this is based on an unit test we assert the
code is 404
-                from("direct:start").enrich("http://localhost:8123/myserver?throwException=false&user=Camel",
new AggregationStrategy() {
+                from("direct:start").enrich("http://localhost:8123/myserver?throwExceptionOnFailure=false&user=Camel",
new AggregationStrategy() {
                     public Exchange aggregate(Exchange original, Exchange resource) {
                         // get the response code
                         Integer code = resource.getOut().getHeader(HttpConstants.HTTP_RESPONSE_CODE,
Integer.class);



Mime
View raw message