camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r562398 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/test/java/org/apache/camel/component/file/ camel-core/src/test/java/org/apache/camel/component/mock/ camel-core/src/test/java/org/apache/camel/pro...
Date Fri, 03 Aug 2007 09:38:04 GMT
Author: jstrachan
Date: Fri Aug  3 02:38:03 2007
New Revision: 562398

URL: http://svn.apache.org/viewvc?view=rev&rev=562398
Log:
minor renaming of some of the helper methods to avoid possible method call ambiguities

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelTemplate.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/AggregatorTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DelayerTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
    activemq/camel/trunk/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
    activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpRouteTest.java
    activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRouteTest.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/event/EventRouteTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/ContentBasedRouteTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelTemplate.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelTemplate.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelTemplate.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelTemplate.java Fri
Aug  3 02:38:03 2007
@@ -136,8 +136,8 @@
      * @param headerValue the header value
      * @return the result
      */
-    public Object sendBody(String endpointUri, final Object body, final String header, final
Object headerValue) {
-        return sendBody(resolveMandatoryEndpoint(endpointUri), body, header, headerValue);
+    public Object sendBodyAndHeader(String endpointUri, final Object body, final String header,
final Object headerValue) {
+        return sendBodyAndHeader(resolveMandatoryEndpoint(endpointUri), body, header, headerValue);
     }
     
     /**
@@ -149,7 +149,7 @@
      * @param headerValue the header value
      * @return the result
      */
-    public Object sendBody(Endpoint endpoint, final Object body, final String header, final
Object headerValue) {
+    public Object sendBodyAndHeader(Endpoint endpoint, final Object body, final String header,
final Object headerValue) {
         E result = send(endpoint, new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
@@ -167,8 +167,8 @@
      * @param body        the payload send
      * @return the result
      */
-    public Object sendBody(String endpointUri, final Object body, final Map<String, Object>
headers) {
-        return sendBody(resolveMandatoryEndpoint(endpointUri), body, headers);
+    public Object sendBodyAndHeaders(String endpointUri, final Object body, final Map<String,
Object> headers) {
+        return sendBodyAndHeaders(resolveMandatoryEndpoint(endpointUri), body, headers);
     }
 
     /**
@@ -178,7 +178,7 @@
      * @param body        the payload send
      * @return the result
      */
-    public Object sendBody(Endpoint endpoint, final Object body, final Map<String, Object>
headers) {
+    public Object sendBodyAndHeaders(Endpoint endpoint, final Object body, final Map<String,
Object> headers) {
         E result = send(endpoint, new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();
@@ -223,12 +223,12 @@
         return send(getMandatoryDefaultEndpoint(), processor);
     }
 
-    public Object sendBody(Object body, String header, Object headerValue) {
-        return sendBody(getMandatoryDefaultEndpoint(), body, header, headerValue);
+    public Object sendBodyAndHeader(Object body, String header, Object headerValue) {
+        return sendBodyAndHeader(getMandatoryDefaultEndpoint(), body, header, headerValue);
     }
 
-    public Object sendBody(Object body, Map<String, Object> headers) {
-        return sendBody(getMandatoryDefaultEndpoint(), body, headers);
+    public Object sendBodyAndHeaders(Object body, Map<String, Object> headers) {
+        return sendBodyAndHeaders(getMandatoryDefaultEndpoint(), body, headers);
     }
 
     // Properties

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/ProducerTemplate.java Fri
Aug  3 02:38:03 2007
@@ -57,7 +57,7 @@
      * @param headerValue the header value
      * @return the result
      */
-    Object sendBody(Object body, String header, Object headerValue);
+    Object sendBodyAndHeader(Object body, String header, Object headerValue);
 
     /**
      * Sends the body to the default endpoint with the specified headers and header values
@@ -65,7 +65,7 @@
      * @param body        the payload send
      * @return the result
      */
-    Object sendBody(Object body, Map<String, Object> headers);
+    Object sendBodyAndHeaders(Object body, Map<String, Object> headers);
 
 
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -32,7 +32,7 @@
         MockEndpoint result = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         result.expectedBodiesReceived(expectedBody);
 
-        template.sendBody(uri, expectedBody, "cheese", 123);
+        template.sendBodyAndHeader(uri, expectedBody, "cheese", 123);
 
         result.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
Fri Aug  3 02:38:03 2007
@@ -80,7 +80,7 @@
 
     protected void sendMessages(int... counters) {
         for (int counter : counters) {
-            template.sendBody("direct:a", "<message>" + counter + "</message>",
+            template.sendBodyAndHeader("direct:a", "<message>" + counter + "</message>",
                     "counter", counter);
         }
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/AggregatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/AggregatorTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/AggregatorTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/AggregatorTest.java
Fri Aug  3 02:38:03 2007
@@ -35,7 +35,7 @@
         // lets send a large batch of messages
         for (int i = 1; i <= messageCount; i++) {
             String body = "message:" + i;
-            template.sendBody("direct:a", body, "cheese", 123);
+            template.sendBodyAndHeader("direct:a", body, "cheese", 123);
         }
 
         resultEndpoint.assertIsSatisfied();

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
Fri Aug  3 02:38:03 2007
@@ -59,7 +59,7 @@
     }
 
     protected void sendMessage(final Object headerValue, final Object body) throws Exception
{
-        template.sendBody("direct:start", body, "foo", headerValue);
+        template.sendBodyAndHeader("direct:start", body, "foo", headerValue);
     }
 
     @Override

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DelayerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DelayerTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DelayerTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DelayerTest.java
Fri Aug  3 02:38:03 2007
@@ -30,7 +30,7 @@
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         resultEndpoint.expectedMessageCount(0);
 
-        template.sendBody("seda:a", "<hello>world!</hello>", "JMSTimestamp",
System.currentTimeMillis());
+        template.sendBodyAndHeader("seda:a", "<hello>world!</hello>", "JMSTimestamp",
System.currentTimeMillis());
         resultEndpoint.assertIsSatisfied();
 
         // now if we wait a bit longer we should receive the message!

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
Fri Aug  3 02:38:03 2007
@@ -30,7 +30,7 @@
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         resultEndpoint.expectedMessageCount(1);
 
-        template.sendBody("direct:start", "<matched/>", "foo", "bar");
+        template.sendBodyAndHeader("direct:start", "<matched/>", "foo", "bar");
 
         resultEndpoint.assertIsSatisfied();
     }
@@ -39,7 +39,7 @@
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         resultEndpoint.expectedMessageCount(0);
 
-        template.sendBody("direct:start", "<notMatched/>", "foo", "notMatchedHeaderValue");
+        template.sendBodyAndHeader("direct:start", "<notMatched/>", "foo", "notMatchedHeaderValue");
 
         resultEndpoint.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-activemq/src/test/java/org/apache/camel/component/activemq/ActiveMQRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -43,7 +43,7 @@
     }
 
     protected void sendExchange(final Object expectedBody) {
-        template.sendBody(startEndpointUri, expectedBody, "cheese", 123);
+        template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123);
     }
 
     @Override

Modified: activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -51,7 +51,7 @@
     }
 
     protected void sendExchange(final Object expectedBody) {
-        template.sendBody(startEndpointUri, expectedBody, "cheese", 123);
+        template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123);
     }
 
     @Override

Modified: activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -23,14 +23,7 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
 import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.net.URLConnection;
 import java.util.List;
 import java.util.Map;
 
@@ -62,7 +55,7 @@
     }
 
     protected void invokeHttpEndpoint() throws IOException {
-        template.sendBody("http://localhost:8080/test", expectedBody, "Content-Type", "application/xml");
+        template.sendBodyAndHeader("http://localhost:8080/test", expectedBody, "Content-Type",
"application/xml");
     }
 
     @Override

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -57,7 +57,7 @@
     }
 
     protected void sendExchange(final Object expectedBody) {
-        template.sendBody(startEndpointUri, expectedBody, "cheese", 123);
+        template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123);
     }
 
 

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -42,7 +42,7 @@
 
         HashMap<String, Object> headers = new HashMap<String, Object>();
         headers.put("reply-to", "reply1@localhost");
-        template.sendBody("smtp://james@localhost", "hello world!", headers);
+        template.sendBodyAndHeaders("smtp://james@localhost", "hello world!", headers);
 
         // lets test the first sent worked
         assertMailboxReceivedMessages("james@localhost");

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/event/EventRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/event/EventRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/event/EventRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/event/EventRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -34,7 +34,7 @@
         MockEndpoint result = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         result.expectedMessageCount(2);
 
-        template.sendBody(uri, expectedBody, "cheese", 123);
+        template.sendBodyAndHeader(uri, expectedBody, "cheese", 123);
 
         result.assertIsSatisfied();
 

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/ContentBasedRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/ContentBasedRouteTest.java?view=diff&rev=562398&r1=562397&r2=562398
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/ContentBasedRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/example/ContentBasedRouteTest.java
Fri Aug  3 02:38:03 2007
@@ -35,7 +35,7 @@
         matchedEndpoint.expectedMessageCount(1);
         notMatchedEndpoint.expectedMessageCount(0);
 
-        template.sendBody("direct:start", body, header, "firstChoice");
+        template.sendBodyAndHeader("direct:start", body, header, "firstChoice");
 
         assertIsSatisfied(matchedEndpoint, notMatchedEndpoint);
     }
@@ -44,7 +44,7 @@
         matchedEndpoint.expectedMessageCount(0);
         notMatchedEndpoint.expectedMessageCount(1);
 
-        template.sendBody("direct:start", body, header, "notMatchedValue");
+        template.sendBodyAndHeader("direct:start", body, header, "notMatchedValue");
 
         assertIsSatisfied(matchedEndpoint, notMatchedEndpoint);
     }



Mime
View raw message