camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Component docs
Date Fri, 15 Jan 2016 16:51:58 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 61c07897e -> 7eb78c9d6


Component docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7eb78c9d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7eb78c9d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7eb78c9d

Branch: refs/heads/camel-2.16.x
Commit: 7eb78c9d613d38721dbe5f74c2a16fb3f9a06b91
Parents: 61c0789
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jan 15 17:51:16 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jan 15 17:51:45 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/beanstalk/EndpointTest.java  | 12 ------------
 .../apache/camel/component/jms/JmsConfiguration.java    |  3 ++-
 .../jms/JmsRouteWithCustomListenerContainerTest.java    |  4 ++--
 .../camel/component/routebox/RouteboxConfiguration.java | 11 +++++++++--
 .../component/sjms/batch/SjmsBatchEndpointTest.java     |  4 ++--
 .../component/spring/batch/SpringBatchEndpointTest.java |  4 ++--
 .../java/org/apache/camel/catalog/CamelCatalogTest.java |  4 ++--
 7 files changed, 19 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/EndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/EndpointTest.java
b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/EndpointTest.java
index bb3adf7..f425e20 100644
--- a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/EndpointTest.java
+++ b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/EndpointTest.java
@@ -17,8 +17,6 @@
 package org.apache.camel.component.beanstalk;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.FailedToCreateRouteException;
-import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.junit.After;
 import org.junit.Before;
@@ -75,16 +73,6 @@ public class EndpointTest {
         assertArrayEquals("Tubes", new String[]{"tube1", "tube+", "tube?"}, endpoint.conn.tubes);
     }
 
-    @Test(expected = FailedToCreateRouteException.class)
-    public void testWrongCommand() throws Exception {
-        context.addRoutes(new RouteBuilder() {
-            @Override
-            public void configure() {
-                from("direct:start").to("beanstalk:default?command=noCommand");
-            }
-        });
-    }
-
     @After
     public void tearDown() throws Exception {
         context.stop();

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
index 1f1037d..2c60f14 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
@@ -132,6 +132,7 @@ public class JmsConfiguration implements Cloneable {
     private boolean replyToDeliveryPersistent = true;
     @UriParam(defaultValue = "-1", label = "producer")
     private long timeToLive = -1;
+    @UriParam(label = "advanced")
     private MessageConverter messageConverter;
     @UriParam(defaultValue = "true", label = "advanced")
     private boolean mapJmsMessage = true;
@@ -175,7 +176,7 @@ public class JmsConfiguration implements Cloneable {
     private boolean replyToSameDestinationAllowed;
     @UriParam(enums = "Bytes,Map,Object,Stream,Text")
     private JmsMessageType jmsMessageType;
-    @UriParam(label = "advanced")
+    @UriParam(label = "advanced", enums = "default,passthrough")
     private JmsKeyFormatStrategy jmsKeyFormatStrategy;
     @UriParam(label = "advanced")
     private boolean transferExchange;

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithCustomListenerContainerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithCustomListenerContainerTest.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithCustomListenerContainerTest.java
index 07f4e4c..3abc7af 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithCustomListenerContainerTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteWithCustomListenerContainerTest.java
@@ -56,7 +56,7 @@ public class JmsRouteWithCustomListenerContainerTest extends CamelTestSupport
{
         assertEquals(ExchangePattern.InOut, inbox.getReceivedExchanges().get(0).getPattern());
         assertEquals(ExchangePattern.InOnly, order.getReceivedExchanges().get(0).getPattern());
         
-        JmsEndpoint jmsEndpoint = getMandatoryEndpoint("activemq:queue:inbox?messageListenerContainerFactoryRef=myListenerContainerFactory",
JmsEndpoint.class);        
+        JmsEndpoint jmsEndpoint = getMandatoryEndpoint("activemq:queue:inbox?messageListenerContainerFactory=#myListenerContainerFactory",
JmsEndpoint.class);
         assertIsInstanceOf(MyListenerContainerFactory.class, jmsEndpoint.getMessageListenerContainerFactory());
         assertEquals(ConsumerType.Custom, jmsEndpoint.getConfiguration().getConsumerType());
       
         assertIsInstanceOf(MyListenerContainer.class, jmsEndpoint.createMessageListenerContainer());
@@ -84,7 +84,7 @@ public class JmsRouteWithCustomListenerContainerTest extends CamelTestSupport
{
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("activemq:queue:inbox?messageListenerContainerFactoryRef=myListenerContainerFactory")
+                from("activemq:queue:inbox?messageListenerContainerFactory=#myListenerContainerFactory")
                     .to("mock:inbox")
                     .inOnly("activemq:topic:order")
                     .bean("orderService", "handleOrder");

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
b/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
index 567a4c3..dec6eb1 100644
--- a/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
+++ b/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
@@ -40,8 +40,6 @@ public class RouteboxConfiguration {
     private static final Logger LOG = LoggerFactory.getLogger(RouteboxConfiguration.class);
 
     private CamelContext innerContext;
-    private List<RouteBuilder> routeBuilders = new ArrayList<RouteBuilder>();
-    private Registry innerRegistry;
     private URI uri;
     private String authority;
     private ProducerTemplate innerProducerTemplate;
@@ -66,6 +64,10 @@ public class RouteboxConfiguration {
     private int queueSize;
     @UriParam(label = "producer", defaultValue = "true")
     private boolean sendToConsumer = true;
+    @UriParam(label = "advanced")
+    private Registry innerRegistry;
+    @UriParam(label = "advanced", javaType = "java.lang.String")
+    private List<RouteBuilder> routeBuilders = new ArrayList<RouteBuilder>();
 
     public RouteboxConfiguration() {
     }
@@ -176,6 +178,11 @@ public class RouteboxConfiguration {
         this.innerContext = innerContext;
     }
 
+    /**
+     * A string representing a key in the Camel Registry matching an object value of the
type List<org.apache.camel.builder.RouteBuilder>.
+     * If the user does not supply an innerContext pre-primed with inner routes, the routeBuilders
option must be provided as a non-empty
+     * list of RouteBuilders containing inner routes
+     */
     public void setRouteBuilders(List<RouteBuilder> routeBuilders) {
         this.routeBuilders = routeBuilders;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpointTest.java
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpointTest.java
index 45fe324..c20ba85 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpointTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpointTest.java
@@ -78,11 +78,11 @@ public class SjmsBatchEndpointTest extends CamelTestSupport {
         return true;
     }
 
-    @Test(expected = FailedToCreateProducerException.class)
+    @Test(expected = FailedToCreateRouteException.class)
     public void testProducerFailure() throws Exception {
         context.addRoutes(new RouteBuilder() {
             public void configure() throws Exception {
-                from("direct:in").to("sjms-batch:testQueue");
+                from("direct:in").to("sjms-batch:testQueue?aggregationStrategy=#unknown");
             }
         });
         context.start();

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/components/camel-spring-batch/src/test/java/org/apache/camel/component/spring/batch/SpringBatchEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-batch/src/test/java/org/apache/camel/component/spring/batch/SpringBatchEndpointTest.java
b/components/camel-spring-batch/src/test/java/org/apache/camel/component/spring/batch/SpringBatchEndpointTest.java
index 92c1e93..54868ff 100644
--- a/components/camel-spring-batch/src/test/java/org/apache/camel/component/spring/batch/SpringBatchEndpointTest.java
+++ b/components/camel-spring-batch/src/test/java/org/apache/camel/component/spring/batch/SpringBatchEndpointTest.java
@@ -207,7 +207,7 @@ public class SpringBatchEndpointTest extends CamelTestSupport {
         context().addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:launcherRefTest").to("spring-batch:mockJob?jobLauncherRef=alternativeJobLauncher");
+                from("direct:launcherRefTest").to("spring-batch:mockJob?jobLauncher=#alternativeJobLauncher");
             }
         });
 
@@ -215,7 +215,7 @@ public class SpringBatchEndpointTest extends CamelTestSupport {
         template.sendBody("direct:launcherRefTest", "Start the job, please.");
 
         // Then
-        SpringBatchEndpoint batchEndpoint = context().getEndpoint("spring-batch:mockJob?jobLauncherRef=alternativeJobLauncher",
SpringBatchEndpoint.class);
+        SpringBatchEndpoint batchEndpoint = context().getEndpoint("spring-batch:mockJob?jobLauncher=#alternativeJobLauncher",
SpringBatchEndpoint.class);
         JobLauncher batchEndpointJobLauncher = (JobLauncher) FieldUtils.readField(batchEndpoint,
"jobLauncher", true);
         assertSame(alternativeJobLauncher, batchEndpointJobLauncher);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/7eb78c9d/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 275d5c2..8af0a29 100644
--- a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -436,9 +436,9 @@ public class CamelCatalogTest {
         assertEquals(0, result.getNumberOfErrors());
 
         // reference
-        result = catalog.validateEndpointProperties("jms:queue:myqueue?jmsKeyFormatStrategy=key");
+        result = catalog.validateEndpointProperties("jms:queue:myqueue?jmsKeyFormatStrategy=foo");
         assertFalse(result.isSuccess());
-        assertEquals("key", result.getInvalidReference().get("jmsKeyFormatStrategy"));
+        assertEquals("foo", result.getInvalidEnum().get("jmsKeyFormatStrategy"));
         assertEquals(1, result.getNumberOfErrors());
 
         // okay


Mime
View raw message