camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1165039 - in /camel/branches/camel-2.8.x: ./ components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ components/camel-servlet/src/test/java/org/apache/camel/component/servlet/
Date Sun, 04 Sep 2011 14:46:02 GMT
Author: ningjiang
Date: Sun Sep  4 14:46:02 2011
New Revision: 1165039

URL: http://svn.apache.org/viewvc?rev=1165039&view=rev
Log:
Merged revisions 1164973,1165000 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1164973 | ningjiang | 2011-09-04 16:49:25 +0800 (Sun, 04 Sep 2011) | 1 line
  
  CAMEL-4410 The URI of the ServletEndpoint exposed to the JMX is not accurate
........
  r1165000 | ningjiang | 2011-09-04 20:07:00 +0800 (Sun, 04 Sep 2011) | 1 line
  
  CAMEL-4410 removed the unused code
........

Added:
    camel/branches/camel-2.8.x/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
      - copied unchanged from r1165000, camel/trunk/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ExposedServletEndpointURIToJMXTest.java
Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
    camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Sep  4 14:46:02 2011
@@ -1 +1 @@
-/camel/trunk:1148706,1148710,1149570,1150651,1151000,1151054,1151087,1151362,1152170,1152755,1153620,1153812,1153829,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157749,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395,1163420,1164557,1164633
+/camel/trunk:1148706,1148710,1149570,1150651,1151000,1151054,1151087,1151362,1152170,1152755,1153620,1153812,1153829,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157749,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395,1163420,1164557,1164633,1164973-1165000

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java?rev=1165039&r1=1165038&r2=1165039&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
(original)
+++ camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
Sun Sep  4 14:46:02 2011
@@ -37,7 +37,6 @@ import org.apache.commons.httpclient.par
 public class ServletComponent extends HttpComponent {
 
     private String servletName = "CamelServlet";
-    
     private HttpRegistry httpRegistry;
 
     public String getServletName() {
@@ -47,23 +46,20 @@ public class ServletComponent extends Ht
     public void setServletName(String servletName) {
         this.servletName = servletName;
     }
-    
+
     public void setHttpRegistry(HttpRegistry httpRegistry) {
         this.httpRegistry = httpRegistry;
     }
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
-        
         if (httpRegistry == null) {
             httpRegistry = DefaultHttpRegistry.getSingletonHttpRegistry();
         }
 
-        uri = uri.startsWith("servlet:") ? remaining : uri;
-
         HttpClientParams params = new HttpClientParams();
         IntrospectionSupport.setProperties(params, parameters, "httpClient.");
-        
+
         // create the configurer to use for this endpoint
         final Set<AuthMethod> authMethods = new LinkedHashSet<AuthMethod>();
         HttpClientConfigurer configurer = createHttpClientConfigurer(parameters, authMethods);
@@ -78,7 +74,6 @@ public class ServletComponent extends Ht
 
         // 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(UnsafeUriCharactersEncoder.encode(uri)),
CastUtils.cast(parameters));
-        uri = httpUri.toString();
 
         ServletEndpoint endpoint = createServletEndpoint(uri, this, httpUri, params, getHttpConnectionManager(),
configurer);
         endpoint.setServletName(servletName);
@@ -114,10 +109,8 @@ public class ServletComponent extends Ht
     /**
      * Strategy to create the servlet endpoint.
      */
-    protected ServletEndpoint createServletEndpoint(String endpointUri,
-            ServletComponent component, URI httpUri, HttpClientParams params,
-            HttpConnectionManager httpConnectionManager,
-            HttpClientConfigurer clientConfigurer) throws Exception {
+    protected ServletEndpoint createServletEndpoint(String endpointUri, ServletComponent
component, URI httpUri, HttpClientParams params,
+                                                    HttpConnectionManager httpConnectionManager,
HttpClientConfigurer clientConfigurer) throws Exception {
         return new ServletEndpoint(endpointUri, component, httpUri, params, httpConnectionManager,
clientConfigurer);
     }
 
@@ -130,6 +123,5 @@ public class ServletComponent extends Ht
     public void disconnect(HttpConsumer consumer) throws Exception {
         httpRegistry.unregister(consumer);
     }
-    
-    
+
 }
\ No newline at end of file

Modified: camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java?rev=1165039&r1=1165038&r2=1165039&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
(original)
+++ camel/branches/camel-2.8.x/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
Sun Sep  4 14:46:02 2011
@@ -21,7 +21,6 @@ import java.net.URISyntaxException;
 
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
-import org.apache.camel.Producer;
 import org.apache.camel.component.http.HttpClientConfigurer;
 import org.apache.camel.component.http.HttpConsumer;
 import org.apache.camel.component.http.HttpEndpoint;
@@ -36,11 +35,11 @@ public class ServletEndpoint extends Htt
         super();
     }
 
-    public ServletEndpoint(String endPointURI, ServletComponent component, URI httpUri, HttpClientParams
params,
-                           HttpConnectionManager httpConnectionManager, HttpClientConfigurer
clientConfigurer) throws URISyntaxException {
+    public ServletEndpoint(String endPointURI, ServletComponent component, URI httpUri, HttpClientParams
params, HttpConnectionManager httpConnectionManager,
+                           HttpClientConfigurer clientConfigurer) throws URISyntaxException
{
         super(endPointURI, component, httpUri, params, httpConnectionManager, clientConfigurer);
     }
-    
+
     public void setServletName(String name) {
         servletName = name;
     }
@@ -50,13 +49,14 @@ public class ServletEndpoint extends Htt
     }
 
     @Override
-    public Producer createProducer() throws Exception {
-        return super.createProducer();
+    public Consumer createConsumer(Processor processor) throws Exception {
+        return new HttpConsumer(this, processor);
     }
 
     @Override
-    public Consumer createConsumer(Processor processor) throws Exception {
-        return new HttpConsumer(this, processor);
+    public boolean isLenientProperties() {
+        // in contrast to the HttpEndpoint, the ServletEndpoint knows about all it's options
on the passed URI
+        return false;
     }
 
 }



Mime
View raw message