[3/5] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6742fb77 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6742fb77 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6742fb77 Branch: refs/heads/master Commit: 6742fb77f3e91811dad3bd6893692e2079ef15a8 Parents: e178218 Author: Claus IbsenAuthored: Tue Jan 5 09:31:57 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 09:31:57 2016 +0100 -- .../java/org/apache/camel/component/stub/StubEndpoint.java| 6 +- .../java/org/apache/camel/catalog/DefaultCamelCatalog.java| 7 --- .../test/java/org/apache/camel/catalog/CamelCatalogTest.java | 6 +- 3 files changed, 10 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6742fb77/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java index 9a96e9d..cd24eba 100644 --- a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java @@ -36,7 +36,7 @@ import org.apache.camel.spi.UriEndpoint; * query arguments will usually fail. Stub won't though, as it basically ignores all query parameters * to let you quickly stub out one or more endpoints in your route temporarily. */ -@UriEndpoint(scheme = "stub", title = "Stub", syntax = "stub:name", consumerClass = VmConsumer.class, label = "core,testing", lenientProperties = true) +@UriEndpoint(scheme = "stub", title = "Stub", syntax = "stub:name", consumerClass = VmConsumer.class, label = "core,testing") public class StubEndpoint extends VmEndpoint { public StubEndpoint(String endpointUri, Component component, BlockingQueue queue) { @@ -56,8 +56,4 @@ public class StubEndpoint extends VmEndpoint { return new StubConsumer(this, processor); } -@Override -public boolean isLenientProperties() { -return true; -} } http://git-wip-us.apache.org/repos/asf/camel/blob/6742fb77/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 83b9c58..5a023c9 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -738,11 +738,12 @@ public class DefaultCamelCatalog implements CamelCatalog { Map properties; List
[1/5] camel git commit: CAMEL-9479: bean/class component - Should use bean. prefix for bean options
Repository: camel Updated Branches: refs/heads/camel-2.16.x d11b039c5 -> 0e77534ba refs/heads/master 7336d59d9 -> 6742fb77f CAMEL-9479: bean/class component - Should use bean. prefix for bean options Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e53d8a72 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e53d8a72 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e53d8a72 Branch: refs/heads/master Commit: e53d8a7265859f07d1cdc9a4c4ac04eaee8e08ce Parents: 7336d59 Author: Claus IbsenAuthored: Mon Jan 4 22:10:46 2016 +0100 Committer: Claus Ibsen Committed: Mon Jan 4 22:10:46 2016 +0100 -- .../java/org/apache/camel/component/bean/BeanComponent.java | 7 +-- .../java/org/apache/camel/component/bean/BeanEndpoint.java | 2 +- .../org/apache/camel/component/beanclass/ClassComponent.java | 8 +++- .../org/apache/camel/component/beanclass/ClassEndpoint.java | 6 +- .../bean/ClassComponentInvalidConfigurationTest.java | 2 +- ...lassComponentWithPropertiesLookupSetFromEndpointTest.java | 2 +- .../ClassComponentWithPropertiesSetFromEndpointTest.java | 2 +- 7 files changed, 17 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e53d8a72/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java index 6e54402..fb3ecb4 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanComponent.java @@ -20,6 +20,7 @@ import java.util.Map; import org.apache.camel.Endpoint; import org.apache.camel.impl.UriEndpointComponent; +import org.apache.camel.util.IntrospectionSupport; import org.apache.camel.util.LRUSoftCache; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,8 +49,10 @@ public class BeanComponent extends UriEndpointComponent { BeanEndpoint endpoint = new BeanEndpoint(uri, this); endpoint.setBeanName(remaining); setProperties(endpoint, parameters); -// any remaining parameters are parameters for the bean -endpoint.setParameters(parameters); + +// the bean.xxx options is for the bean +Map options = IntrospectionSupport.extractProperties(parameters, "bean."); +endpoint.setParameters(options); return endpoint; } http://git-wip-us.apache.org/repos/asf/camel/blob/e53d8a72/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java index 2de7d53..cbad9f4 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java @@ -47,7 +47,7 @@ public class BeanEndpoint extends DefaultEndpoint { + "true means the message body should be an array of parameters. Note: This option is used internally by Camel, and is not intended for end users to use.") @Deprecated private boolean multiParameterArray; -@UriParam(label = "advanced", description = "Used for configuring additional properties on the bean") +@UriParam(prefix = "bean.", label = "advanced", description = "Used for configuring additional properties on the bean", multiValue = true) private Map parameters; public BeanEndpoint() { http://git-wip-us.apache.org/repos/asf/camel/blob/e53d8a72/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassComponent.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassComponent.java b/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassComponent.java index 34b36b3..5372c0f 100644 --- a/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/beanclass/ClassComponent.java @@ -22,6 +22,7 @@ import org.apache.camel.Endpoint; import org.apache.camel.component.bean.BeanComponent; import org.apache.camel.component.bean.BeanHolder; import org.apache.camel.component.bean.ConstantBeanHolder; +import org.apache.camel.util.IntrospectionSupport; /** * The http://camel.apache.org/class.html;>Class Component is for
[2/5] camel git commit: Polished
Polished Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e1782180 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e1782180 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e1782180 Branch: refs/heads/master Commit: e1782180b410785c956e8ac296ae08f26c2ee420 Parents: e53d8a7 Author: Claus IbsenAuthored: Mon Jan 4 22:11:23 2016 +0100 Committer: Claus Ibsen Committed: Mon Jan 4 22:11:23 2016 +0100 -- .../mock/MockComponentConfigurationAndDocumentationTest.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e1782180/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java index e321ed8..e257dba 100644 --- a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java @@ -40,7 +40,6 @@ public class MockComponentConfigurationAndDocumentationTest extends ContextTestS ComponentConfiguration compConf = comp.createComponentConfiguration(); String json = compConf.createParameterJsonSchema(); assertNotNull(json); -System.out.println(json); assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\"")); assertTrue(json.contains("\"expectedCount\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
[4/5] camel git commit: Polished
Polished Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f1aaabd0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f1aaabd0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f1aaabd0 Branch: refs/heads/camel-2.16.x Commit: f1aaabd0084d045d20c2e4413aecd11ef16e659c Parents: d11b039 Author: Claus IbsenAuthored: Mon Jan 4 22:11:23 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 09:32:36 2016 +0100 -- .../mock/MockComponentConfigurationAndDocumentationTest.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f1aaabd0/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java index e321ed8..e257dba 100644 --- a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java @@ -40,7 +40,6 @@ public class MockComponentConfigurationAndDocumentationTest extends ContextTestS ComponentConfiguration compConf = comp.createComponentConfiguration(); String json = compConf.createParameterJsonSchema(); assertNotNull(json); -System.out.println(json); assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\"")); assertTrue(json.contains("\"expectedCount\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
[5/5] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0e77534b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0e77534b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0e77534b Branch: refs/heads/camel-2.16.x Commit: 0e77534ba70a4f4c09c3f6664488003f0df8ea2e Parents: f1aaabd Author: Claus IbsenAuthored: Tue Jan 5 09:31:57 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 09:32:44 2016 +0100 -- .../java/org/apache/camel/component/stub/StubEndpoint.java| 6 +- .../java/org/apache/camel/catalog/DefaultCamelCatalog.java| 7 --- .../test/java/org/apache/camel/catalog/CamelCatalogTest.java | 6 +- 3 files changed, 10 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0e77534b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java index 9a96e9d..cd24eba 100644 --- a/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/stub/StubEndpoint.java @@ -36,7 +36,7 @@ import org.apache.camel.spi.UriEndpoint; * query arguments will usually fail. Stub won't though, as it basically ignores all query parameters * to let you quickly stub out one or more endpoints in your route temporarily. */ -@UriEndpoint(scheme = "stub", title = "Stub", syntax = "stub:name", consumerClass = VmConsumer.class, label = "core,testing", lenientProperties = true) +@UriEndpoint(scheme = "stub", title = "Stub", syntax = "stub:name", consumerClass = VmConsumer.class, label = "core,testing") public class StubEndpoint extends VmEndpoint { public StubEndpoint(String endpointUri, Component component, BlockingQueue queue) { @@ -56,8 +56,4 @@ public class StubEndpoint extends VmEndpoint { return new StubConsumer(this, processor); } -@Override -public boolean isLenientProperties() { -return true; -} } http://git-wip-us.apache.org/repos/asf/camel/blob/0e77534b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 83b9c58..5a023c9 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -738,11 +738,12 @@ public class DefaultCamelCatalog implements CamelCatalog { Map properties; List
[3/3] camel git commit: CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException
CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5ee90c1a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5ee90c1a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5ee90c1a Branch: refs/heads/camel-2.15.x Commit: 5ee90c1aa8f61c3765f9c825fbb2385b591ab6ab Parents: 4ccd7de Author: Claus IbsenAuthored: Tue Jan 5 09:49:47 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 10:25:15 2016 +0100 -- .../idempotent/IdempotentConsumer.java | 74 .../IdempotentConsumerRepoExceptionTest.java| 70 ++ 2 files changed, 113 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5ee90c1a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java index d3afe7a..f534991 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java +++ b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java @@ -78,48 +78,60 @@ public class IdempotentConsumer extends ServiceSupport implements AsyncProcessor } public boolean process(Exchange exchange, AsyncCallback callback) { -final String messageId = messageIdExpression.evaluate(exchange, String.class); -if (messageId == null) { -exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +final String messageId; +try { +messageId = messageIdExpression.evaluate(exchange, String.class); +if (messageId == null) { +exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +callback.done(true); +return true; +} +} catch (Exception e) { +exchange.setException(e); callback.done(true); return true; } -boolean newKey; -if (eager) { -// add the key to the repository -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); +try { +boolean newKey; +if (eager) { +// add the key to the repository +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); +} else { +newKey = idempotentRepository.add(messageId); +} } else { -newKey = idempotentRepository.add(messageId); +// check if we already have the key +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); +} else { +newKey = !idempotentRepository.contains(messageId); +} } -} else { -// check if we already have the key -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); -} else { -newKey = !idempotentRepository.contains(messageId); -} -} - -if (!newKey) { -// mark the exchange as duplicate -exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); +if (!newKey) { +// mark the exchange as duplicate +exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); -// we already have this key so its a duplicate message -onDuplicate(exchange, messageId); +// we already have this key so its a duplicate message +onDuplicate(exchange, messageId); -if (skipDuplicate) { -// if we should skip duplicate then we are done -LOG.debug("Ignoring duplicate message with id: {} for exchange: {}", messageId, exchange); -callback.done(true); -return true; +if (skipDuplicate) { +// if we should skip duplicate then we are done +
[1/3] camel git commit: CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException
Repository: camel Updated Branches: refs/heads/camel-2.15.x 4ccd7deb8 -> 5ee90c1aa refs/heads/camel-2.16.x 0e77534ba -> 9c95ebd05 refs/heads/master 6742fb77f -> 0ead2cac3 CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0ead2cac Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0ead2cac Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0ead2cac Branch: refs/heads/master Commit: 0ead2cac3cc9473487677f4aee9c872fbc358fc9 Parents: 6742fb7 Author: Claus IbsenAuthored: Tue Jan 5 09:49:47 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 09:49:47 2016 +0100 -- .../idempotent/IdempotentConsumer.java | 82 .../IdempotentConsumerRepoExceptionTest.java| 70 + 2 files changed, 118 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0ead2cac/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java index e28a214..7b64546 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java +++ b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java @@ -91,51 +91,65 @@ public class IdempotentConsumer extends ServiceSupport implements AsyncProcessor } public boolean process(final Exchange exchange, final AsyncCallback callback) { -final String messageId = messageIdExpression.evaluate(exchange, String.class); -if (messageId == null) { -exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +final AsyncCallback target; + +final String messageId; +try { +messageId = messageIdExpression.evaluate(exchange, String.class); +if (messageId == null) { +exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +callback.done(true); +return true; +} +} catch (Exception e) { +exchange.setException(e); callback.done(true); return true; } -boolean newKey; -if (eager) { -// add the key to the repository -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); -} else { -newKey = idempotentRepository.add(messageId); -} -} else { -// check if we already have the key -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); +try { +boolean newKey; +if (eager) { +// add the key to the repository +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); +} else { +newKey = idempotentRepository.add(messageId); +} } else { -newKey = !idempotentRepository.contains(messageId); +// check if we already have the key +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); +} else { +newKey = !idempotentRepository.contains(messageId); +} } -} +if (!newKey) { +// mark the exchange as duplicate +exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); -if (!newKey) { -// mark the exchange as duplicate -exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); +// we already have this key so its a duplicate message +onDuplicate(exchange, messageId); -// we already have this key so its a duplicate message -onDuplicate(exchange, messageId); - -if (skipDuplicate) { -// if we should skip duplicate then we are done -LOG.debug("Ignoring duplicate message with id: {}
[2/3] camel git commit: CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException
CAMEL-9480: IdempotentConsumer - If exception from repo it should be able to handle by onException Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9c95ebd0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9c95ebd0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9c95ebd0 Branch: refs/heads/camel-2.16.x Commit: 9c95ebd05fff740a79e7f38540a6ba56fe100494 Parents: 0e77534 Author: Claus IbsenAuthored: Tue Jan 5 09:49:47 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 10:23:21 2016 +0100 -- .../idempotent/IdempotentConsumer.java | 82 .../IdempotentConsumerRepoExceptionTest.java| 70 + 2 files changed, 118 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9c95ebd0/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java index e28a214..7b64546 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java +++ b/camel-core/src/main/java/org/apache/camel/processor/idempotent/IdempotentConsumer.java @@ -91,51 +91,65 @@ public class IdempotentConsumer extends ServiceSupport implements AsyncProcessor } public boolean process(final Exchange exchange, final AsyncCallback callback) { -final String messageId = messageIdExpression.evaluate(exchange, String.class); -if (messageId == null) { -exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +final AsyncCallback target; + +final String messageId; +try { +messageId = messageIdExpression.evaluate(exchange, String.class); +if (messageId == null) { +exchange.setException(new NoMessageIdException(exchange, messageIdExpression)); +callback.done(true); +return true; +} +} catch (Exception e) { +exchange.setException(e); callback.done(true); return true; } -boolean newKey; -if (eager) { -// add the key to the repository -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); -} else { -newKey = idempotentRepository.add(messageId); -} -} else { -// check if we already have the key -if (idempotentRepository instanceof ExchangeIdempotentRepository) { -newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); +try { +boolean newKey; +if (eager) { +// add the key to the repository +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).add(exchange, messageId); +} else { +newKey = idempotentRepository.add(messageId); +} } else { -newKey = !idempotentRepository.contains(messageId); +// check if we already have the key +if (idempotentRepository instanceof ExchangeIdempotentRepository) { +newKey = ((ExchangeIdempotentRepository) idempotentRepository).contains(exchange, messageId); +} else { +newKey = !idempotentRepository.contains(messageId); +} } -} +if (!newKey) { +// mark the exchange as duplicate +exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); -if (!newKey) { -// mark the exchange as duplicate -exchange.setProperty(Exchange.DUPLICATE_MESSAGE, Boolean.TRUE); +// we already have this key so its a duplicate message +onDuplicate(exchange, messageId); -// we already have this key so its a duplicate message -onDuplicate(exchange, messageId); - -if (skipDuplicate) { -// if we should skip duplicate then we are done -LOG.debug("Ignoring duplicate message with id: {} for exchange: {}", messageId, exchange); -callback.done(true); -return true; +if (skipDuplicate) { +//
svn commit: r977087 - in /websites/production/camel/content: cache/main.pageCache camel-2170-release.html
Author: buildbot Date: Tue Jan 5 09:19:55 2016 New Revision: 977087 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2170-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2170-release.html == --- websites/production/camel/content/camel-2170-release.html (original) +++ websites/production/camel/content/camel-2170-release.html Tue Jan 5 09:19:55 2016 @@ -85,7 +85,7 @@ -Camel 2.17.0 release (currently in progress)http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;>New and NoteworthyWelcome to the x.y.z release which approx XXX issues resolved (new features, improvements and bug fixes such as...)highlighted issue fixedUpgraded camel-hbase to Hadoop 2.x and HBase 1.1.xCamel commands forSpring BootMany improvements toCamel 0;KuraAdded transacted option toSQL Component when used as a consumer in a transacted route.Added support for UPDATE operation toElasticSearch.Allow to reuse existing configured Elasticsearch Client on the ElasticSearch component, instead of creating a client per endpoint.Theinclude andexclude options onFile2 andFTP endpoints is now case in-sensitive out of the box.Resource based component such asXSLT,Velocityetc can load the resource file from theRegistryby usingref: as prefix.Upgraded camel-amqp to the latest qpid-jms-client (also AMQP 1.0 is not supported anymore).Many improvements to Camel AMQP component.TheMetrics Component allows to captureMessage History performance statistics with theMetricsMessageHistoryFactoryReduced the number of mbeans enlisted in the services tree, to only include mbeans that has value to be managed.TheElasticsearch Componentnow supports MultiGet operationTheThrottler has been improved to be more performant and use a rolling window for time periods which gives a better flow.ThesetHeader andsetExchangePr operty allows to use a dynamic header key using theSimplelanguage if the name of the key is aSimplelanguage expression.Add collate function toSimple language to make it easier to split a message body into sub lists of a specified size. The function is similar to the collate function from Groovy.TheCamel Run Maven Goal is able to auto detect if its a OSGi Blueprint or CDI project so end users no longer have to explicit configure this on the plugin.Camel-Elasticsearch now supports Multiget, Multisearch and exists operationCamel-Git now supports Cherry-pick operationStopping theMain class from JMX will now trigger shutdown of the Mai n class/JVM also, as it does when hitting ctrl + c.Added option to skipFirst to theTokenizer language to make it easy to skip the very first element, when for example splitting a CSV file using theSplitter EIP.Fixed these issuesTheSwagger Java now parses nested types in the POJO model that has been annotated with the swagger api annotations to use in the schema api modelFixedRest DSL withapiContextPath fail to start if there are 2 ore more rest's in use.Paho component name is not limited to 4 characters anymore.FixedSpring Boot not starting Camel routes if running in Spring Cloud.Fixed an issue withSwagger Java using ap i-docs could lead to api-doc route being added multiple timesFixed a few things missing in the generated swagger model when usingSwagger JavaNew Enterprise Integration PatternsNew Componentscamel-kubernetes - Integrates Camel with Kubernetescamel-aws - AWS kineses streams component addedcamel-aws - DynamoDB streams component addedcamel-ignite - for working with Apache Ignite.camel-mllp -for working with the HL7 MLLP protocol. This is an alternative toHL7 component.camel-spark - bridges Apache Spark computations with Camel endpointsNew DSLNew AnnotationsNew Data FormatsMIME-Multipart - mime based data format.New LanguagesNew Examplescamel-example-spring-boot-metrics - showing a Camel spring-boot application that report metrics to Graphite. Requires Graphite running on your network.New TutorialsAPI breakingKnown IssuesDependency upgradesApache Cassandra from 2.1.8 to 2.2.2Apac he Deltaspike from 1.5.1 to 1.5.2Apache Gora from 0.6 to 0.6.1Apache Jackrabbit from 2.11.0 to 2.11.3Apache Kafka from 0.8.2.2 to 0.9.0.0Apache Lucene from 4.10.4 to 5.2.1Apache Mina from 2.0.9 to 2.0.10Apache OpenEjb from 4.7.2 to 4.7.3Apache Solr from 4.10.4 to 5.2.1Aws SDK Java to version 1.10.37Atmosphere from 2.4.0 to 2.4.1.4Cassandra driver from 2.1.8 to 2.1.9Cassandra-unit from 2.1.9.2 to 2.2.2.1Cglib from 3.1 to 3.2.0Classmate from 1.3.0 to 1.3.1Chunk from 3.0.1 to
camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/camel-2.16.x aea0bef84 -> af14ebfce Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/af14ebfc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/af14ebfc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/af14ebfc Branch: refs/heads/camel-2.16.x Commit: af14ebfce4ce034b87b27b56c64a5027364c18c7 Parents: aea0bef Author: Claus IbsenAuthored: Tue Jan 5 17:21:43 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:38:10 2016 +0100 -- .../java/org/apache/camel/http/common/HttpCommonEndpoint.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/af14ebfc/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java -- diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java index 19cfcc1..22b9017 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java +++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java @@ -31,7 +31,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head // Note: all options must be documented with description in annotations so extended components can access the documentation HttpCommonComponent component; -UrlRewrite urlRewrite; @UriPath(label = "producer", description = "The url of the HTTP endpoint to call.") @Metadata(required = "true") URI httpUri; @@ -99,6 +98,10 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head @UriParam(label = "producer", defaultValue = "200-299", description = "The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.") private String okStatusCodeRange = "200-299"; +@UriParam(label = "producer,advanced", +description = "Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints." ++ " See more details at http://camel.apache.org/urlrewrite.html;) +private UrlRewrite urlRewrite; public HttpCommonEndpoint() { } @@ -408,4 +411,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head public void setOkStatusCodeRange(String okStatusCodeRange) { this.okStatusCodeRange = okStatusCodeRange; } + + }
[1/6] camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/camel-2.16.x af14ebfce -> 9e91c334e refs/heads/master 6ad29b2ec -> a4aeefef5 Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1795520f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1795520f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1795520f Branch: refs/heads/master Commit: 1795520fef21791531d59f3b01d810160242803f Parents: 6ad29b2 Author: Claus IbsenAuthored: Tue Jan 5 17:58:50 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:58:50 2016 +0100 -- .../camel/http/common/HttpCommonEndpoint.java | 30 +--- .../apache/camel/http/common/HttpConsumer.java | 2 +- .../apache/camel/http/common/HttpMessage.java | 4 +-- .../http/HttpReferenceParameterTest.java| 4 +-- 4 files changed, 25 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java -- diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java index 22b9017..2856c48 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java +++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java @@ -37,7 +37,7 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head @UriParam(description = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.") HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy(); @UriParam(description = "To use a custom HttpBinding to control the mapping between Camel message and HttpClient.") -HttpBinding binding; +HttpBinding httpBinding; @UriParam(label = "producer", defaultValue = "true", description = "Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server." + " This allows you to get all responses regardless of the HTTP status code.") @@ -138,25 +138,35 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head // Properties //- +@Deprecated public HttpBinding getBinding() { -if (binding == null) { +return httpBinding; +} + +@Deprecated +public void setBinding(HttpBinding httpBinding) { +setHttpBinding(httpBinding); +} + +public HttpBinding getHttpBinding() { +if (httpBinding == null) { // create a new binding and use the options from this endpoint -binding = new DefaultHttpBinding(); -binding.setHeaderFilterStrategy(getHeaderFilterStrategy()); -binding.setTransferException(isTransferException()); +httpBinding = new DefaultHttpBinding(); +httpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy()); +httpBinding.setTransferException(isTransferException()); if (getComponent() != null) { - binding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject()); + httpBinding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject()); } - binding.setEagerCheckContentAvailable(isEagerCheckContentAvailable()); + httpBinding.setEagerCheckContentAvailable(isEagerCheckContentAvailable()); } -return binding; +return httpBinding; } /** * To use a custom HttpBinding to control the mapping between Camel message and HttpClient. */ -public void setBinding(HttpBinding binding) { -this.binding = binding; +public void setHttpBinding(HttpBinding httpBinding) { +this.httpBinding = httpBinding; } public String getPath() { http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java -- diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java index f389081..3a2da8e 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java +++
[3/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a4aeefef Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a4aeefef Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a4aeefef Branch: refs/heads/master Commit: a4aeefef5a1b48168026837d662a0a2e24e3f667 Parents: 28b096a Author: Claus IbsenAuthored: Tue Jan 5 18:10:25 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 18:10:25 2016 +0100 -- .../camel/component/http/HttpComponent.java | 12 ++--- .../camel/component/http/HttpEndpoint.java | 27 2 files changed, 35 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a4aeefef/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java index 3106f2d..9caa8cc 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java @@ -203,14 +203,17 @@ public class HttpComponent extends HttpCommonComponent { UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, "urlRewrite", UrlRewrite.class); // http client can be configured from URI options HttpClientParams clientParams = new HttpClientParams(); -IntrospectionSupport.setProperties(clientParams, parameters, "httpClient."); +Map httpClientOptions = IntrospectionSupport.extractProperties(parameters, "httpClient."); +IntrospectionSupport.setProperties(clientParams, httpClientOptions); // validate that we could resolve all httpClient. parameters as this component is lenient -validateParameters(uri, parameters, "httpClient."); +validateParameters(uri, httpClientOptions, null); // http client can be configured from URI options HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams(); // setup the httpConnectionManagerParams -IntrospectionSupport.setProperties(connectionManagerParams, parameters, "httpConnectionManager."); -validateParameters(uri, parameters, "httpConnectionManager."); +Map httpConnectionManagerOptions = IntrospectionSupport.extractProperties(parameters, "httpConnectionManager."); +IntrospectionSupport.setProperties(connectionManagerParams, httpConnectionManagerOptions); +// validate that we could resolve all httpConnectionManager. parameters as this component is lenient +validateParameters(uri, httpConnectionManagerOptions, null); // make sure the component httpConnectionManager is take effect HttpConnectionManager thisHttpConnectionManager = httpConnectionManager; if (thisHttpConnectionManager == null) { @@ -280,6 +283,7 @@ public class HttpComponent extends HttpCommonComponent { } } endpoint.setHttpUri(httpUri); +endpoint.setHttpClientOptions(httpClientOptions); return endpoint; } http://git-wip-us.apache.org/repos/asf/camel/blob/a4aeefef/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java index b7ff65b..153774b 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java @@ -21,6 +21,7 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Map; import org.apache.camel.Consumer; import org.apache.camel.PollingConsumer; @@ -51,7 +52,12 @@ public class HttpEndpoint extends HttpCommonEndpoint { @UriParam(label = "advanced") private HttpClientConfigurer httpClientConfigurer; +@UriParam(label = "advanced", prefix = "httpClient.", multiValue = true) +private Map httpClientOptions; +@UriParam(label = "advanced") private HttpConnectionManager httpConnectionManager; +@UriParam(label = "advanced", prefix = "httpConnectionManager.", multiValue = true) +private Map httpConnectionManagerOptions;
camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/master a4aeefef5 -> 7bc2cc33a Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7bc2cc33 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7bc2cc33 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7bc2cc33 Branch: refs/heads/master Commit: 7bc2cc33a050313ba59288b962b65c040a587266 Parents: a4aeefe Author: Claus IbsenAuthored: Tue Jan 5 18:25:13 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 18:25:13 2016 +0100 -- .../camel/component/http4/HttpComponent.java| 8 --- .../camel/component/http4/HttpEndpoint.java | 24 ++-- .../http4/HttpReferenceParameterTest.java | 2 +- 3 files changed, 28 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7bc2cc33/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java -- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java index c2f8c3c..1ff3300 100644 --- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java @@ -152,14 +152,15 @@ public class HttpComponent extends HttpCommonComponent { // http client can be configured from URI options HttpClientBuilder clientBuilder = HttpClientBuilder.create(); // allow the builder pattern -IntrospectionSupport.setProperties(clientBuilder, parameters, "httpClient.", true); +Map httpClientOptions = IntrospectionSupport.extractProperties(parameters, "httpClient."); +IntrospectionSupport.setProperties(clientBuilder, httpClientOptions); // set the Request configure this way and allow the builder pattern RequestConfig.Builder requestConfigBuilder = RequestConfig.custom(); -IntrospectionSupport.setProperties(requestConfigBuilder, parameters, "httpClient.", true); +IntrospectionSupport.setProperties(requestConfigBuilder, httpClientOptions); clientBuilder.setDefaultRequestConfig(requestConfigBuilder.build()); // validate that we could resolve all httpClient. parameters as this component is lenient -validateParameters(uri, parameters, "httpClient."); +validateParameters(uri, httpClientOptions, null); HttpBinding httpBinding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class); HttpContext httpContext = resolveAndRemoveReferenceParameter(parameters, "httpContext", HttpContext.class); @@ -269,6 +270,7 @@ public class HttpComponent extends HttpCommonComponent { if (endpoint.getCookieStore() == null) { endpoint.setCookieStore(getCookieStore()); } +endpoint.setHttpClientOptions(httpClientOptions); return endpoint; } http://git-wip-us.apache.org/repos/asf/camel/blob/7bc2cc33/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java -- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java index 874a595..19b8d8f 100644 --- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEndpoint.java @@ -19,6 +19,7 @@ package org.apache.camel.component.http4; import java.io.Closeable; import java.net.URI; import java.net.URISyntaxException; +import java.util.Map; import org.apache.camel.Consumer; import org.apache.camel.PollingConsumer; @@ -49,12 +50,17 @@ public class HttpEndpoint extends HttpCommonEndpoint { private static final Logger LOG = LoggerFactory.getLogger(HttpEndpoint.class); -// Note: all options must be documented with description in annotations so extended components can access the documentation - +@UriParam(label = "advanced") private HttpContext httpContext; +@UriParam(label = "advanced") private HttpClientConfigurer httpClientConfigurer; +@UriParam(label = "advanced", prefix = "httpClient.", multiValue = true) +private Map httpClientOptions; +@UriParam(label = "advanced") private HttpClientConnectionManager clientConnectionManager; +@UriParam(label = "advanced")
[3/4] camel git commit: fixed wrong name
fixed wrong name Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c978bbd7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c978bbd7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c978bbd7 Branch: refs/heads/master Commit: c978bbd7dbc41ddbfa2aee6f1b095fec6b880cc0 Parents: b43c01c Author: AskannonAuthored: Tue Jan 5 15:05:59 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:40:45 2016 +0100 -- .../src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c978bbd7/camel-core/src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java b/camel-core/src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java index 5258ea0..38fe66a 100644 --- a/camel-core/src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java +++ b/camel-core/src/test/java/org/apache/camel/model/LoadRestFromXmlTest.java @@ -41,7 +41,7 @@ public class LoadRestFromXmlTest extends ContextTestSupport { return jndi; } -public void testLoadRouteFromXml() throws Exception { +public void testLoadRestFromXml() throws Exception { assertNotNull("Existing foo route should be there", context.getRoute("foo")); assertEquals(2, context.getRoutes().size());
svn commit: r977113 [2/4] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2170-release.html http.html http4.html
Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Tue Jan 5 17:22:31 2016 @@ -3725,11 +3725,11 @@ The tutorial has been designed in two pa While not actual tutorials you might find working through the source of the various Examples useful. Tutorial on Spring Remoting with JMSThanksThis tutorial was kindly donated to Apache Camel by Martin Gilday.PrefaceThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a http://www.springramework.org; rel="nofollow">Spring service. The route works in a synchronous fashion returning a response to the client./**/ +/*]]>*/ Tutorial on Spring Remoting with JMSPrefacePrerequisitesDistributionAboutCreate the Camel Project Update the POM with Dependencies Writing the Server @@ -5834,11 +5834,11 @@ So we completed the last piece in the pi This example has been removed from Camel 2.9 onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use CXF instead of Axis. /**/ +/*]]>*/ Tutorial using Axis 1.4 with Apache Camel PrerequisitesDistributionIntroductionSetting up the project to run Axis Maven 2wsdlConfiguring AxisRunning the Example @@ -17288,11 +17288,11 @@ template.send(direct:alias-verify& ]]> See Also Configuring CamelComponentEndpointGetting StartedCrypto Crypto is also available as a Data Format CXF ComponentWhen using CXF as a consumer, the CXF Bean Component allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to consume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.When using CXF in streaming modes (see DataFormat option), then also read about Stream caching.The cxf: component provides integration with http://cxf.apache.org;>Apache CXF for connecting to JAX-WS services hosted in CXF./**/ +/*]]>*/ CXF Component URI formatOptions The descriptions of the dataformats @@ -20540,7 +20540,7 @@ from(direct:start) to uri=http://www.google.com/; to uri=mock:results/ ]]> -HttpEndpoint OptionsNameDefault ValueDescriptionthrowExceptionOnFailuretrueOption to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.bridgeEndpointfalseIf the option is true , HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the * throwExceptionOnFailure* to be false to let the HttpProducer send all the fault response back. Camel 2.3: If the option is true, HttpProducer and CamelServlet will skip the gzip processing if the content-encoding is "gzip".disableStreamCachefalseDefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support read it twice, otherwise DefaultHttpBinding will set the request input stream direct into the m essage body.httpBindingRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpBinding in the Registry. Use the httpBinding option instead.httpBindingnullCamel 2.3: Reference to a org.apache.camel.component.http.HttpBinding in the Registry.httpClientConfigurerRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry. Use the httpClientConfigurer option instead.httpClientConfigurernullCamel 2.3: Reference to a
[1/2] camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/master 34c512e3e -> df701cc37 Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bc5a4020 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bc5a4020 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bc5a4020 Branch: refs/heads/master Commit: bc5a4020e38e3069b00c065653f548575f324827 Parents: 34c512e Author: Claus IbsenAuthored: Tue Jan 5 17:21:43 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:38:52 2016 +0100 -- .../java/org/apache/camel/http/common/HttpCommonEndpoint.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bc5a4020/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java -- diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java index 19cfcc1..22b9017 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java +++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java @@ -31,7 +31,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head // Note: all options must be documented with description in annotations so extended components can access the documentation HttpCommonComponent component; -UrlRewrite urlRewrite; @UriPath(label = "producer", description = "The url of the HTTP endpoint to call.") @Metadata(required = "true") URI httpUri; @@ -99,6 +98,10 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head @UriParam(label = "producer", defaultValue = "200-299", description = "The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.") private String okStatusCodeRange = "200-299"; +@UriParam(label = "producer,advanced", +description = "Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints." ++ " See more details at http://camel.apache.org/urlrewrite.html;) +private UrlRewrite urlRewrite; public HttpCommonEndpoint() { } @@ -408,4 +411,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head public void setOkStatusCodeRange(String okStatusCodeRange) { this.okStatusCodeRange = okStatusCodeRange; } + + }
[2/4] camel git commit: Load REST DSL from XML files
Load REST DSL from XML files Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b43c01c4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b43c01c4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b43c01c4 Branch: refs/heads/master Commit: b43c01c4c4a8c9e2671726e04a987df1d2c09a44 Parents: 976ae69 Author: AskannonAuthored: Tue Jan 5 13:33:11 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:40:45 2016 +0100 -- .../boot/CamelConfigurationProperties.java | 15 + .../camel/spring/boot/RoutesCollector.java | 33 ++-- 2 files changed, 45 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b43c01c4/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java index 0aa0da3..be07ff1 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java @@ -54,6 +54,12 @@ public class CamelConfigurationProperties { */ private String xmlRoutes = "classpath:camel/*.xml"; +/** + * Directory to scan for adding additional XML rests. + * You can turn this off by setting the value to false + */ +private String xmlRests = "classpath:camel-rest/*.xml"; + // Getters & setters public boolean isJmxEnabled() { @@ -103,4 +109,13 @@ public class CamelConfigurationProperties { public void setXmlRoutes(String xmlRoutes) { this.xmlRoutes = xmlRoutes; } + + public String getXmlRests() { + return xmlRests; + } + + public void setXmlRests(String xmlRests) { + this.xmlRests = xmlRests; + } + } http://git-wip-us.apache.org/repos/asf/camel/blob/b43c01c4/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java -- diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java index 49a9015..33947c0 100644 --- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java +++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java @@ -23,7 +23,10 @@ import java.util.List; import org.apache.camel.CamelContext; import org.apache.camel.RoutesBuilder; +import org.apache.camel.model.RouteDefinition; import org.apache.camel.model.RoutesDefinition; +import org.apache.camel.model.rest.RestDefinition; +import org.apache.camel.model.rest.RestsDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; @@ -32,8 +35,8 @@ import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.core.io.Resource; /** - * Collects routes from the various sources (like Spring application context beans registry or opinionated classpath - * locations) and injects these into the Camel context. + * Collects routes and rests from the various sources (like Spring application context beans registry or opinionated + * classpath locations) and injects these into the Camel context. */ public class RoutesCollector implements ApplicationListener { @@ -91,6 +94,11 @@ public class RoutesCollector implements ApplicationListener routeDefinitions = xmlDefinition.asRouteDefinition(camelContext); + camelContext.addRouteDefinitions(routeDefinitions); + } + } + } catch (FileNotFoundException e) { +LOG.debug("No XML rests found in {}. Skipping XML rests detection.", directory); + } catch (Exception e) { + throw new RuntimeException(e); + } +} + }
svn commit: r977113 [3/4] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2170-release.html http.html http4.html
Modified: websites/production/camel/content/http.html == --- websites/production/camel/content/http.html (original) +++ websites/production/camel/content/http.html Tue Jan 5 17:22:31 2016 @@ -127,7 +127,7 @@ from(direct:start) to uri=http://www.google.com/; to uri=mock:results/ ]]> -HttpEndpoint OptionsNameDefault ValueDescriptionthrowExceptionOnFailuretrueOption to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.bridgeEndpointfalseIf the option is true , HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the * throwExceptionOnFailure* to be false to let the HttpProducer send all the fault response back. Camel 2.3: If the option is true, HttpProducer and CamelServlet will skip the gzip processing if the content-encoding is "gzip".disableStreamCachefalseDefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support read it twice, otherwise DefaultHttpBinding will set the request input stream direct into the message bo dy.httpBindingRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpBinding in the Registry. Use the httpBinding option instead.httpBindingnullCamel 2.3: Reference to a org.apache.camel.component.http.HttpBinding in the Registry.httpClientConfigurerRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry. Use the httpClientConfigurer option instead.httpClientConfigurernullCamel 2.3: Reference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry.httpClient.XXXnullSetting options on the http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpClientParams.html;>HttpClientParams. For instance httpClient.soTimeout=5000 will set the SO_TIMEOUT to 5 seconds.clientConnectionManagernullTo use a custom org.apache.http.conn.ClientConnectionManager.transferExceptionfalseCamel 2.6: If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type (for example using Jetty or SERVLET Camel components). On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized.headerFilterStrategynullCamel 2.11: Reference to a instance of org.apache.camel.spi.HeaderFilterStrategy in the Registry. It will be used to apply the custom headerFilterStrategy on the new create HttpEndpoint. urlRewritenullCamel 2.11: Producer only Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints. See more details at UrlRewrite and How to use Camel as a HTTP proxy between a client and server.eagerCheckContentAvailablefalseCamel 2.15.3/2.16: Consumer only Whether to eager check whether the HTTP reque sts has content if the content-length header is 0 or not present. This can be turned on in case HTTP clients do not send streamed data.copyHeaderstrueCamel 2.16: If this option is true then IN exchange headers will be copied to OUT exchange headers according to copy strategy. Setting this to false, allows to only include the headers from the HTTP response (not propagating IN headers).okStatusCodeRange200-299Camel 2.16: The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.ignoreResponseBodyfalseCamel 2.16: If this option is true, The http producer won't read response body and cache the input stream.Authentication and ProxyThe following authentication options can also be set on the HttpEndpoint:NameDefault ValueDescriptionauthMethodnullclass="confluenceTd">Authentication method, either as Basic, >Digest or NTLM.rowspan="1" >class="confluenceTd">authMethodPrioritycolspan="1" rowspan="1" class="confluenceTd">nullcolspan="1" rowspan="1" class="confluenceTd">Priority of authentication >methods. Is a list separated with comma. For example: >Basic,Digest to exclude NTLM.colspan="1" rowspan="1" >class="confluenceTd">authUsernamerowspan="1" class="confluenceTd">nullrowspan="1" class="confluenceTd">Username for >authenticationclass="confluenceTd">authPasswordrowspan="1" class="confluenceTd">nullPassword for authenticationauthDomainnullDomain for NTML authenticationauthHostnullOptional host for NTML authenticationproxyHostnullThe proxy host nameproxyPort nullThe proxy port numberproxyAuthMethodnullAuthentication method for proxy, either as Basic, Digest or
svn commit: r977113 [4/4] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2170-release.html http.html http4.html
Modified: websites/production/camel/content/http4.html == --- websites/production/camel/content/http4.html (original) +++ websites/production/camel/content/http4.html Tue Jan 5 17:22:31 2016 @@ -96,7 +96,7 @@ camel-http4 vs camel-httpCamel-http4 uses http://hc.apache.org/httpcomponents-client-ga/;>Apache HttpClient 4.x while camel-http uses http://hc.apache.org/httpclient-3.x/;>Apache HttpClient 3.x.URI format -Will by default use port 80 for HTTP and 443 for HTTPS.You can append query options to the URI in the following format, ?option=valueoption=value...camel-http4 vs camel-jettyYou can only produce to endpoints generated by the HTTP4 component. Therefore it should never be used as input into your Camel Routes. To bind/expose an HTTP endpoint via a HTTP server as input to a Camel route, use the Jetty Component instead.HttpComponent OptionsNameDefault ValueDescriptionmaxTotalConnections200The maximum number of connections.connectionsPerRoute20The maximum number of connections per route.cookieStorenullCamel 2.11.2/2.12.0: To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookies shouldn't be stored as we are just bridging (eg acting as a proxy).httpClientConfigurernullReference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry.clientConnectionManagernullTo use a custom org.apache.http.conn.ClientConnectionManager.httpBindingnullTo use a custom org.apache.camel.component.http.HttpBinding.httpContextnullCamel 2.9.2: To use a custom org.apache.http.protocol.HttpContext when executing requests.sslContextParametersnullCamel 2.8: To use a custom org.apache.camel.util.jsse.SSLContextParam eters. See Using the JSSE Configuration Utility. Important: Only one instance of org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent. If you need to use 2 or more different instances, you need to define a new HttpComponent per instance you need. See further below for more details.x509HostnameVerifierBrowserCompatHostnameVerifierCamel 2.7: You can refer to a different org.apache.http.conn.ssl.X509HostnameVerifier instance in the Registry such as org.apache.http.conn.ssl.StrictHostnameVerifier or org.apache.http.conn.ssl.AllowAllHostnameVerifier.< /p>connectionTimeToLive-1Camel 2.11.0: The time for connection to live, the time unit is millisecond, the default value is always keep alive.allowJavaSerializedObjectfalseCamel 2.16.1/2.15.5: Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk.HttpEndpoint OptionsNameDefault ValueDescriptionthrowExceptionOnFailuretrueOption to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.bridgeEndpointfalseIf true, HttpProdu cer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExcpetionOnFailure to be false to let the HttpProducer send all fault responses back. Also if set to true HttpProducer and CamelServlet will skip the gzip processing if the content-encoding is "gzip".clearExpiredCookiestrueCamel 2.11.2/2.12.0: Whether to clear expired cookies before sending the HTTP request. This ensures the cookies store does not keep growing by adding new cookies which is newer removed when they are expired.cookieStorenullCamel 2.11.2/2.12.0: To use a custom org.apache.http.client.CookieStore. By default the org.apache.http.impl.client.BasicCookieStore is used which is an in-memory only cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie store as cookies shouldn't be stored as we are just bridging (eg acting as a proxy).disableStreamCachefalseDefaultHttpBinding will copy the request input stream into a stream cache and put it into the message body if this option is false to support multiple reads, otherwise DefaultHttpBinding will set the request input stream directly in the message body.headerFilterStrategynullCamel 2.10.4: Reference to a instance of org.apache.camel.spi.HeaderFilterStrategy in the Registry.It will be used to apply the custom headerFilterStrategy on the new create HttpEndpoint.httpBindingRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpBinding in the Registry. Use the httpBinding option instead.httpBinding nullTo use a custom
svn commit: r977113 [1/4] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2170-release.html http.html http4.html
Author: buildbot Date: Tue Jan 5 17:22:31 2016 New Revision: 977113 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2170-release.html websites/production/camel/content/http.html websites/production/camel/content/http4.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Tue Jan 5 17:22:31 2016 @@ -1016,11 +1016,11 @@ template.send(direct:alias-verify& ]]> See Also Configuring CamelComponentEndpointGetting StartedCrypto Crypto is also available as a Data Format CXF ComponentWhen using CXF as a consumer, the CXF Bean Component allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to cons ume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.When using CXF in streaming modes (see DataFormat option), then also read about Stream caching.The cxf: component provides integration with http://cxf.apache.org;>Apache CXF for connecting to JAX-WS services hosted in CXF./**/ +/*]]>*/ CXF Component URI formatOptions The descriptions of the dataformats @@ -4268,7 +4268,7 @@ from(direct:start) to uri=http://www.google.com/; to uri=mock:results/ ]]> -HttpEndpoint OptionsNameDefault ValueDescriptionthrowExceptionOnFailuretrueOption to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.bridgeEndpointfalseIf the option is true , HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the * throwExceptionOnFailure* to be false to let the HttpProducer send all the fault response back. Camel 2.3: If the option is true, HttpProducer and CamelServlet will skip the gzip processing if the content-encoding is "gzip".disableStreamCachefalseDefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support read it twice, otherwise DefaultHttpBinding will set the request input stream direct in to the message body.httpBindingRefnullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpBinding in the Registry. Use the httpBinding option instead.httpBindingnullCamel 2.3: Reference to a org.apache.camel.component.http.HttpBinding in the Registry.httpClientConfigurerRef< /td>nullDeprecated and will be removed in Camel 3.0: Reference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry. Use the httpClientConfigurer option instead.httpClientConfigurernullCamel 2.3: Reference to a org.apache.camel.component.http.HttpClientConfigurer in the Registry.httpClient.XXXnullSetting options on the http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpClientParams.html;>HttpClientParams. For instance httpClient.soTimeout=5000 will set the SO_TIMEOUT to 5 seconds.clientConnectionManagernullTo use a custom org.apache.http.conn.ClientConnectionManager.transferExceptionfalseCamel 2.6: If enabled and an Exchange failed p rocessing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type (for example using Jetty or SERVLET Camel components). On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized.headerFilterStrategynullCamel 2.11: Reference to a instance of org.apache.camel.spi.HeaderFilterStrategy in the Registry. It will be used to apply the custom headerFilterStrategy on the new create HttpEndpoint.< /p>urlRewritenullCamel 2.11: Producer only Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints. See more details at UrlRewrite and How to use Camel as a HTTP proxy between a client and server.eagerCheckContentAvailablefalseCamel
[6/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9e91c334 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9e91c334 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9e91c334 Branch: refs/heads/camel-2.16.x Commit: 9e91c334ec328cc301d4425219390f4311ee2f7e Parents: 54f89a0 Author: Claus IbsenAuthored: Tue Jan 5 18:10:25 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 18:12:34 2016 +0100 -- .../camel/component/http/HttpComponent.java | 12 ++--- .../camel/component/http/HttpEndpoint.java | 27 2 files changed, 35 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9e91c334/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java index 104ff84..723b93e 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java @@ -213,14 +213,17 @@ public class HttpComponent extends HttpCommonComponent { UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, "urlRewrite", UrlRewrite.class); // http client can be configured from URI options HttpClientParams clientParams = new HttpClientParams(); -IntrospectionSupport.setProperties(clientParams, parameters, "httpClient."); +Map httpClientOptions = IntrospectionSupport.extractProperties(parameters, "httpClient."); +IntrospectionSupport.setProperties(clientParams, httpClientOptions); // validate that we could resolve all httpClient. parameters as this component is lenient -validateParameters(uri, parameters, "httpClient."); +validateParameters(uri, httpClientOptions, null); // http client can be configured from URI options HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams(); // setup the httpConnectionManagerParams -IntrospectionSupport.setProperties(connectionManagerParams, parameters, "httpConnectionManager."); -validateParameters(uri, parameters, "httpConnectionManager."); +Map httpConnectionManagerOptions = IntrospectionSupport.extractProperties(parameters, "httpConnectionManager."); +IntrospectionSupport.setProperties(connectionManagerParams, httpConnectionManagerOptions); +// validate that we could resolve all httpConnectionManager. parameters as this component is lenient +validateParameters(uri, httpConnectionManagerOptions, null); // make sure the component httpConnectionManager is take effect HttpConnectionManager thisHttpConnectionManager = httpConnectionManager; if (thisHttpConnectionManager == null) { @@ -290,6 +293,7 @@ public class HttpComponent extends HttpCommonComponent { } } endpoint.setHttpUri(httpUri); +endpoint.setHttpClientOptions(httpClientOptions); return endpoint; } http://git-wip-us.apache.org/repos/asf/camel/blob/9e91c334/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java index 8a856e0..c3c0d48 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java @@ -21,6 +21,7 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Map; import org.apache.camel.Consumer; import org.apache.camel.PollingConsumer; @@ -53,7 +54,12 @@ public class HttpEndpoint extends HttpCommonEndpoint { @UriParam(label = "advanced") private HttpClientConfigurer httpClientConfigurer; +@UriParam(label = "advanced", prefix = "httpClient.", multiValue = true) +private Map httpClientOptions; +@UriParam(label = "advanced") private HttpConnectionManager httpConnectionManager; +@UriParam(label = "advanced", prefix = "httpConnectionManager.", multiValue = true) +private Map httpConnectionManagerOptions;
[5/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/54f89a0f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/54f89a0f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/54f89a0f Branch: refs/heads/camel-2.16.x Commit: 54f89a0f8d630ff8968f987fe7f046f650b4d558 Parents: 00d62d3 Author: Claus IbsenAuthored: Tue Jan 5 18:00:23 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 18:12:27 2016 +0100 -- .../main/java/org/apache/camel/component/http/HttpEndpoint.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/54f89a0f/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java index 6d6704c..8a856e0 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java @@ -28,6 +28,7 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.http.common.HttpCommonEndpoint; import org.apache.camel.spi.UriEndpoint; +import org.apache.camel.spi.UriParam; import org.apache.camel.util.ObjectHelper; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpConnectionManager; @@ -49,6 +50,8 @@ public class HttpEndpoint extends HttpCommonEndpoint { private static final Logger LOG = LoggerFactory.getLogger(HttpEndpoint.class); private HttpClientParams clientParams; + +@UriParam(label = "advanced") private HttpClientConfigurer httpClientConfigurer; private HttpConnectionManager httpConnectionManager;
camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/master 7bc2cc33a -> 61d6d0f6a Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/61d6d0f6 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/61d6d0f6 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/61d6d0f6 Branch: refs/heads/master Commit: 61d6d0f6abe456add11f6373db5101e362ba60bc Parents: 7bc2cc3 Author: Claus IbsenAuthored: Tue Jan 5 18:37:35 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 18:37:35 2016 +0100 -- .../component/jetty/JettyHttpEndpoint.java | 22 +++- 1 file changed, 21 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/61d6d0f6/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java -- diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java index 85793a2..81bf601 100644 --- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java +++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpEndpoint.java @@ -42,7 +42,7 @@ import org.eclipse.jetty.server.Handler; public abstract class JettyHttpEndpoint extends HttpCommonEndpoint { private HttpClient client; -private SSLContextParameters sslContextParameters; + @UriParam(label = "consumer", description = "Specifies whether to enable the session manager on the server side of Jetty.") private boolean sessionSupport; @@ -114,6 +114,13 @@ public abstract class JettyHttpEndpoint extends HttpCommonEndpoint { description = "Allows using a custom multipart filter. Note: setting multipartFilterRef forces the value of enableMultipartFilter to true.") @Deprecated private String multipartFilterRef; +@UriParam(label = "security", +description = "To configure security using SSLContextParameters") +private SSLContextParameters sslContextParameters; +@UriParam(label = "security", +description = "To configure security using SSLContextParameters") +@Deprecated +private String sslContextParametersRef; public JettyHttpEndpoint(JettyHttpComponent component, String uri, URI httpURL) throws URISyntaxException { super(uri, component, httpURL); @@ -349,6 +356,19 @@ public abstract class JettyHttpEndpoint extends HttpCommonEndpoint { this.sslContextParameters = sslContextParameters; } +@Deprecated +public String getSslContextParametersRef() { +return sslContextParametersRef; +} + +/** + * To configure security using SSLContextParameters + */ +@Deprecated +public void setSslContextParametersRef(String sslContextParametersRef) { +this.sslContextParametersRef = sslContextParametersRef; +} + public Integer getHttpClientMinThreads() { return httpClientMinThreads; }
[2/2] camel git commit: CAMEL-9482: Removed option which has been deprecated for a very long time
CAMEL-9482: Removed option which has been deprecated for a very long time Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/df701cc3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/df701cc3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/df701cc3 Branch: refs/heads/master Commit: df701cc3776833c98a3e2b53f86dfd8f01eabe4b Parents: bc5a402 Author: Claus IbsenAuthored: Tue Jan 5 17:22:47 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:38:53 2016 +0100 -- .../camel/component/http/HttpComponent.java | 14 ++--- .../http/HttpReferenceParameterTest.java| 6 ++-- .../camel/component/http4/HttpComponent.java| 32 .../http4/HttpReferenceParameterTest.java | 10 +++--- .../component/servlet/ServletComponent.java | 7 + .../servlet/rest/RestServletGetTest.java| 2 +- .../rest/RestServletGetWildcardsTest.java | 2 +- 7 files changed, 19 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/df701cc3/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java -- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java index 104ff84..3106f2d 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java @@ -65,12 +65,7 @@ public class HttpComponent extends HttpCommonComponent { */ protected HttpClientConfigurer createHttpClientConfigurer(Map parameters, Set authMethods) { // prefer to use endpoint configured over component configured -// TODO cmueller: remove the "httpClientConfigurerRef" look up in Camel 3.0 -HttpClientConfigurer configurer = resolveAndRemoveReferenceParameter(parameters, "httpClientConfigurerRef", HttpClientConfigurer.class); -if (configurer == null) { -// try without ref -configurer = resolveAndRemoveReferenceParameter(parameters, "httpClientConfigurer", HttpClientConfigurer.class); -} +HttpClientConfigurer configurer = resolveAndRemoveReferenceParameter(parameters, "httpClientConfigurer", HttpClientConfigurer.class); if (configurer == null) { // fallback to component configured configurer = getHttpClientConfigurer(); @@ -200,12 +195,7 @@ public class HttpComponent extends HttpCommonComponent { } Map httpClientParameters = new HashMap (parameters); // must extract well known parameters before we create the endpoint -// TODO cmueller: remove the "httpBindingRef" look up in Camel 3.0 -HttpBinding binding = resolveAndRemoveReferenceParameter(parameters, "httpBindingRef", HttpBinding.class); -if (binding == null) { -// try without ref -binding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class); -} +HttpBinding binding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class); String proxyHost = getAndRemoveParameter(parameters, "proxyHost", String.class); Integer proxyPort = getAndRemoveParameter(parameters, "proxyPort", Integer.class); String authMethodPriority = getAndRemoveParameter(parameters, "authMethodPriority", String.class); http://git-wip-us.apache.org/repos/asf/camel/blob/df701cc3/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java -- diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java index 5e93ee3..82ab548 100644 --- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java +++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java @@ -28,8 +28,8 @@ import org.junit.Test; */ public class HttpReferenceParameterTest extends CamelTestSupport { -private static final String TEST_URI_1 = "http://localhost:8080?httpBindingRef=#customBinding=#customConfigurer;; -private static final String TEST_URI_2 = "http://localhost:8081?httpBindingRef=customBinding=customConfigurer;; +private static final String TEST_URI_1 =
[4/4] camel git commit: Fixed CS. This closes #753. This closes #379. This closes #536.
Fixed CS. This closes #753. This closes #379. This closes #536. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6ad29b2e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6ad29b2e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6ad29b2e Branch: refs/heads/master Commit: 6ad29b2ec304600c54bdbe655bd80644981d073f Parents: c978bbd Author: Claus IbsenAuthored: Tue Jan 5 17:50:04 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:50:04 2016 +0100 -- .../apache/camel/impl/DefaultCamelContext.java | 52 ++-- .../apache/camel/model/ModelCamelContext.java | 10 ++-- ...melContextAddRestDefinitionsFromXmlTest.java | 17 +++ .../apache/camel/model/LoadRestFromXmlTest.java | 16 +++--- .../boot/CamelConfigurationProperties.java | 16 +++--- .../camel/spring/boot/RoutesCollector.java | 40 +++ 6 files changed, 75 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6ad29b2e/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java index cef6b6a..c710713 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java @@ -870,32 +870,32 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon } public synchronized RestsDefinition loadRestsDefinition(InputStream is) throws Exception { - // load routes using JAXB - if (jaxbContext == null) { - // must use classloader from CamelContext to have JAXB working - jaxbContext = getModelJAXBContextFactory().newJAXBContext(); - } - - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - Object result = unmarshaller.unmarshal(is); - - if (result == null) { - throw new IOException("Cannot unmarshal to rests using JAXB from input stream: " + is); - } - - // can either be routes or a single route - RestsDefinition answer; - if (result instanceof RestDefinition) { - RestDefinition rest = (RestDefinition) result; - answer = new RestsDefinition(); - answer.getRests().add(rest); - } else if (result instanceof RestsDefinition) { - answer = (RestsDefinition) result; - } else { - throw new IllegalArgumentException("Unmarshalled object is an unsupported type: " + ObjectHelper.className(result) + " -> " + result); - } - - return answer; +// load routes using JAXB +if (jaxbContext == null) { +// must use classloader from CamelContext to have JAXB working +jaxbContext = getModelJAXBContextFactory().newJAXBContext(); +} + +Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); +Object result = unmarshaller.unmarshal(is); + +if (result == null) { +throw new IOException("Cannot unmarshal to rests using JAXB from input stream: " + is); +} + +// can either be routes or a single route +RestsDefinition answer; +if (result instanceof RestDefinition) { +RestDefinition rest = (RestDefinition) result; +answer = new RestsDefinition(); +answer.getRests().add(rest); +} else if (result instanceof RestsDefinition) { +answer = (RestsDefinition) result; +} else { +throw new IllegalArgumentException("Unmarshalled object is an unsupported type: " + ObjectHelper.className(result) + " -> " + result); +} + +return answer; } public synchronized void addRouteDefinitions(Collection routeDefinitions) throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/6ad29b2e/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java b/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java index e2fa327..aea0aac 100644 --- a/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java @@ -56,11 +56,11 @@ public interface ModelCamelContext extends CamelContext { /** * Loads a collection of rest definitions from the given {@link java.io.InputStream}. -* -* @param
[1/4] camel git commit: Add capability to load REST DSL from XML files.
Repository: camel Updated Branches: refs/heads/master df701cc37 -> 6ad29b2ec Add capability to load REST DSL from XML files. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/976ae698 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/976ae698 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/976ae698 Branch: refs/heads/master Commit: 976ae698c920eb33c32f7d61844c3d0817ea2bff Parents: df701cc Author: AskannonAuthored: Tue Jan 5 13:32:43 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 17:40:44 2016 +0100 -- .../java/org/apache/camel/CamelContext.java | 10 ++ .../apache/camel/impl/DefaultCamelContext.java | 30 ++ .../apache/camel/model/ModelCamelContext.java | 10 ++ ...melContextAddRestDefinitionsFromXmlTest.java | 102 +++ .../apache/camel/model/LoadRestFromXmlTest.java | 87 .../resources/org/apache/camel/impl/rest1.xml | 20 .../org/apache/camel/model/barRest.xml | 22 7 files changed, 281 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/976ae698/camel-core/src/main/java/org/apache/camel/CamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/CamelContext.java b/camel-core/src/main/java/org/apache/camel/CamelContext.java index cb21071..727a2b7 100644 --- a/camel-core/src/main/java/org/apache/camel/CamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/CamelContext.java @@ -34,6 +34,7 @@ import org.apache.camel.model.ProcessorDefinition; import org.apache.camel.model.RouteDefinition; import org.apache.camel.model.RoutesDefinition; import org.apache.camel.model.rest.RestDefinition; +import org.apache.camel.model.rest.RestsDefinition; import org.apache.camel.spi.AsyncProcessorAwaitManager; import org.apache.camel.spi.CamelContextNameStrategy; import org.apache.camel.spi.ClassResolver; @@ -627,6 +628,15 @@ public interface CamelContext extends SuspendableService, RuntimeConfiguration { RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception; /** + * Loads a collection of rest definitions from the given {@link java.io.InputStream}. + * + * @param is input stream with the rest(s) definition to add + * @throws Exception if the rest definitions could not be loaded for whatever reason + * @return the rest definitions + */ +RestsDefinition loadRestsDefinition(InputStream is) throws Exception; + +/** * Adds a collection of route definitions to the context * * @param routeDefinitions the route(s) definition to add http://git-wip-us.apache.org/repos/asf/camel/blob/976ae698/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java index 507187c..cef6b6a 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java @@ -97,6 +97,7 @@ import org.apache.camel.model.RouteDefinition; import org.apache.camel.model.RouteDefinitionHelper; import org.apache.camel.model.RoutesDefinition; import org.apache.camel.model.rest.RestDefinition; +import org.apache.camel.model.rest.RestsDefinition; import org.apache.camel.processor.interceptor.BacklogDebugger; import org.apache.camel.processor.interceptor.BacklogTracer; import org.apache.camel.processor.interceptor.Debug; @@ -868,6 +869,35 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon return answer; } +public synchronized RestsDefinition loadRestsDefinition(InputStream is) throws Exception { + // load routes using JAXB + if (jaxbContext == null) { + // must use classloader from CamelContext to have JAXB working + jaxbContext = getModelJAXBContextFactory().newJAXBContext(); + } + + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + Object result = unmarshaller.unmarshal(is); + + if (result == null) { + throw new IOException("Cannot unmarshal to rests using JAXB from input stream: " + is); + } + + // can either be routes or a single route + RestsDefinition answer; + if (result instanceof RestDefinition) { + RestDefinition rest = (RestDefinition) result; + answer = new RestsDefinition(); + answer.getRests().add(rest); + } else if (result instanceof RestsDefinition) { +
[1/2] camel git commit: CAMEL-9472: Add multi value to component docs
Repository: camel Updated Branches: refs/heads/camel-2.16.x c769389b5 -> aea0bef84 refs/heads/master f80881c01 -> 7e73e303a CAMEL-9472: Add multi value to component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7e73e303 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7e73e303 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7e73e303 Branch: refs/heads/master Commit: 7e73e303a713f4b763243b63726f950555a0755c Parents: f80881c Author: Claus IbsenAuthored: Tue Jan 5 15:43:11 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 15:43:11 2016 +0100 -- .../camel/component/sql/DefaultSqlEndpoint.java | 14 ++ .../org/apache/camel/component/sql/SqlComponent.java | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7e73e303/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java index 67e8f23..17fcb68 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java @@ -110,6 +110,9 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint { @UriParam(label = "advanced", defaultValue = "#", description = "Specifies a character that will be replaced to ? in SQL query." + " Notice, that it is simple String.replaceAll() operation and no SQL parsing is involved (quoted strings will also change).") private String placeholder = "#"; +@UriParam(label = "advanced", prefix = "template.", multiValue = true, +description = "Configures the Spring JdbcTemplate with the key/values from the Map") +private Map templateOptions; public DefaultSqlEndpoint() { } @@ -415,6 +418,17 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint { this.placeholder = placeholder; } +public Map getTemplateOptions() { +return templateOptions; +} + +/** + * Configures the Spring JdbcTemplate with the key/values from the Map + */ +public void setTemplateOptions(Map templateOptions) { +this.templateOptions = templateOptions; +} + @SuppressWarnings("unchecked") public List queryForList(ResultSet rs, boolean allowMapToClass) throws SQLException { if (allowMapToClass && outputClass != null) { http://git-wip-us.apache.org/repos/asf/camel/blob/7e73e303/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java index 0446520..460b4f3 100755 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java @@ -77,7 +77,8 @@ public class SqlComponent extends UriEndpointComponent { String parameterPlaceholderSubstitute = getAndRemoveParameter(parameters, "placeholder", String.class, "#"); JdbcTemplate jdbcTemplate = new JdbcTemplate(target); -IntrospectionSupport.setProperties(jdbcTemplate, parameters, "template."); +Map templateOptions = IntrospectionSupport.extractProperties(parameters, "template."); +IntrospectionSupport.setProperties(jdbcTemplate, templateOptions); String query = remaining.replaceAll(parameterPlaceholderSubstitute, "?"); @@ -110,6 +111,7 @@ public class SqlComponent extends UriEndpointComponent { endpoint.setOnConsumeBatchComplete(onConsumeBatchComplete); endpoint.setDataSource(ds); endpoint.setDataSourceRef(dataSourceRef); +endpoint.setTemplateOptions(templateOptions); return endpoint; }
camel git commit: Upgrade Pax-logging to version 1.8.5
Repository: camel Updated Branches: refs/heads/master 7e73e303a -> 34c512e3e Upgrade Pax-logging to version 1.8.5 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/34c512e3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/34c512e3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/34c512e3 Branch: refs/heads/master Commit: 34c512e3ed18fa52bbe7a6ed0a2a5b42019d6c0f Parents: 7e73e30 Author: Andrea CosentinoAuthored: Tue Jan 5 16:46:20 2016 +0100 Committer: Andrea Cosentino Committed: Tue Jan 5 16:46:20 2016 +0100 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/34c512e3/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index d90c645..4018618 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -414,7 +414,7 @@ 1.0.0.RC1 4.8.0 1.3.2 -1.8.4 +1.8.5 1.8.10 0.4 1.6.1
svn commit: r977115 [3/3] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache jetty.html
Modified: websites/production/camel/content/jetty.html == --- websites/production/camel/content/jetty.html (original) +++ websites/production/camel/content/jetty.html Tue Jan 5 18:19:07 2016 @@ -97,7 +97,7 @@ URI format http://hostname[:port][/resourceUri][?options] ]]> -You can append query options to the URI in the following format, ?option=valueoption=value...OptionsNameDefault ValueDescriptionsessionSupportfalseSpecifies whether to enable the session manager on the server side of Jetty.httpClient.XXXnullConfiguration of Jetty's http://wiki.eclipse.org/Jetty/Tutorial/HttpClient; rel="nofollow">HttpClient. For example, setting httpClient.idleTimeout=3 sets the idle timeout to 30 seconds. And httpClient.timeout=3 sets the request timeout to 30 seconds, in case you want to timeout sooner if you have long running request/response calls.httpClientnullTo use a shared org.eclipse.jetty.client.HttpClient for all producers created by this endpoint. This option should only be used in special circumstances.httpClientMinThreadsnullCamel 2.11: Producer only: To set a value for minimum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to min 8 threads used in Jettys thread pool.httpClientMaxThreadsnullCamel 2.11: Producer only: To set a value for maximum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to max 16 threads used in Jettys thread pool.< /td>httpBindingRefnullReference to an org.apache.camel.component.http.HttpBinding in the Registry. HttpBinding can be used to customize how a response should be written for the consumer.jettyHttpBindingRefnullCamel 2.6.0+: Reference to an org.apache.camel.component.jetty.JettyHttpBinding in the Registry. JettyHttpBinding can be used to customize how a response should be written for the producer.matchOnUriPrefixfalseWhether or not the CamelServlet should try to find a target consumer by matching the URI prefix if no exact match is found. See here How do I let Jetty match wildcards.handlersnullSpecifies a comma-delimited set of org.mortbay.jetty.Handler instances in your Registry (such as your Spring ApplicationContext). These handlers are added to the Jetty servlet context (for example, to add security). Important: You can not use different handlers with different Jetty endpoints using the same port number. The handlers is associated to the port number. If you need different handlers, then use different port numbers.chunkedtrueCamel 2.2: If this option is false Jetty servlet will disable the HTTP streaming and set the content-length header on the responseenableJmxfalseCamel 2.3: If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details.disableStreamCachefalseCamel 2.3: Determines whether or not the raw input stream from Jetty is cached or not (Camel will read the stream into a in memory/overflow to file, Stream caching) cache. By default Camel will cache the Jetty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple tim es. If you use Jetty to bridge/proxy an endpoint then consider enabling this option to improve performance, in case you do not need to read the message payload multiple times.throwExceptionOnFailuretrueOption to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardles of the HTTP status code.transferExceptionfalseCamel 2.6: If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized.bridgeEndpointfalseCamel 2.1: If the option is true , HttpProducer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the HttpProducer send all the fault response back. Camel 2.3: If the option is true, HttpProducer and CamelServlet wi ll skip the
svn commit: r977115 [1/3] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache jetty.html
Author: buildbot Date: Tue Jan 5 18:19:07 2016 New Revision: 977115 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/jetty.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Tue Jan 5 18:19:07 2016 @@ -1016,11 +1016,11 @@ template.send(direct:alias-verify& ]]> See Also Configuring CamelComponentEndpointGetting StartedCrypto Crypto is also available as a Data Format CXF ComponentWhen using CXF as a consumer, the CXF Bean Component allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to cons ume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.When using CXF in streaming modes (see DataFormat option), then also read about Stream caching.The cxf: component provides integration with http://cxf.apache.org;>Apache CXF for connecting to JAX-WS services hosted in CXF./**/ +/*]]>*/ CXF Component URI formatOptions The descriptions of the dataformats @@ -5130,7 +5130,7 @@ from(direct:hello) URI format http://hostname[:port][/resourceUri][?options] ]]> -You can append query options to the URI in the following format, ?option=valueoption=value...OptionsNameDefault ValueDescriptionsessionSupportfalseSpecifies whether to enable the session manager on the server side of Jetty.httpClient.XXXnullConfiguration of Jetty's http://wiki.eclipse.org/Jetty/Tutorial/HttpClient; rel="nofollow">HttpClient. For example, setting httpClient.idleTimeout=3 sets the idle timeout to 30 seconds. And httpClient.timeout=3 sets the request timeout to 30 seconds, in case you want to timeout sooner if you have long running request/response calls.httpClientnullTo use a shared org.eclipse.jetty.client.HttpClient for all producers created by this endpoint. This option should only be used in special circumstances.httpClientMinThreadsnullCamel 2.11: Producer only: To set a value for minimum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to min 8 threads used in Jettys thread pool.httpClientMaxThreadsnullCamel 2.11: Producer only: To set a value for maximum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to max 16 threads used in Jetty s thread pool.httpBindingRefnullReference to an org.apache.camel.component.http.HttpBinding in the Registry. HttpBinding can be used to customize how a response should be written for the consumer.jettyHttpBindingRefnullCamel 2.6.0+: Reference to an org.apache.camel.component.jetty.JettyHttpBinding in the Registry. JettyHttpBinding can be used to customize how a response should be written for the producer.matchOnUriPrefixfalseWhether or not the CamelServlet should try to find a target consumer by matching the URI prefix if no exact match is found. See here How do I let Jetty match wildcards.handlersnullSpecifies a comma-delimited set of org.mortbay.jetty.Handler instances in your Registry (such as your Spring ApplicationContext). These handlers are added to the Jetty servlet context (for example, to add security). Important: You can not use different handlers with different Jetty endpoints using the same port number. The handlers is associated to the port number. If you need different handlers, then use different port numbers.chunkedtrueCamel 2.2: If this option is false Jetty servlet will disable the HTTP streaming and set the content-length header on the responseenableJmxfalseCamel 2.3: If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details.disableStreamCachefalseCamel 2.3: Determines whether or not the raw input stream from Jetty is cached or not (Camel will read the stream into a in
svn commit: r977115 [2/3] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache jetty.html
Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Tue Jan 5 18:19:07 2016 @@ -3725,11 +3725,11 @@ The tutorial has been designed in two pa While not actual tutorials you might find working through the source of the various Examples useful. Tutorial on Spring Remoting with JMSThanksThis tutorial was kindly donated to Apache Camel by Martin Gilday.PrefaceThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a http://www.springramework.org; rel="nofollow">Spring service. The route works in a synchronous fashion returning a response to the client./**/ +/*]]>*/ Tutorial on Spring Remoting with JMSPrefacePrerequisitesDistributionAboutCreate the Camel Project Update the POM with Dependencies Writing the Server @@ -5834,11 +5834,11 @@ So we completed the last piece in the pi This example has been removed from Camel 2.9 onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use CXF instead of Axis. /**/ +/*]]>*/ Tutorial using Axis 1.4 with Apache Camel PrerequisitesDistributionIntroductionSetting up the project to run Axis Maven 2wsdlConfiguring AxisRunning the Example @@ -17288,11 +17288,11 @@ template.send(direct:alias-verify& ]]> See Also Configuring CamelComponentEndpointGetting StartedCrypto Crypto is also available as a Data Format CXF ComponentWhen using CXF as a consumer, the CXF Bean Component allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to consume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.When using CXF in streaming modes (see DataFormat option), then also read about Stream caching.The cxf: component provides integration with http://cxf.apache.org;>Apache CXF for connecting to JAX-WS services hosted in CXF./**/ +/*]]>*/ CXF Component URI formatOptions The descriptions of the dataformats @@ -21402,7 +21402,7 @@ from(direct:hello) URI format http://hostname[:port][/resourceUri][?options] ]]> -You can append query options to the URI in the following format, ?option=valueoption=value...OptionsNameDefault ValueDescriptionsessionSupportfalseSpecifies whether to enable the session manager on the server side of Jetty.httpClient.XXXnullConfiguration of Jetty's http://wiki.eclipse.org/Jetty/Tutorial/HttpClient; rel="nofollow">HttpClient. For example, setting httpClient.idleTimeout=3 sets the idle timeout to 30 seconds. And httpClient.timeout=3 sets the request timeout to 30 seconds, in case you want to timeout sooner if you have long running request/response calls.httpClientnullTo use a shared org.eclipse.jetty.client.HttpClient for all producers created by this endpoint. This option should only be used in special circumstances.httpClientMinThreadsnullCamel 2.11: Producer only: To set a value for minimum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to min 8 threads used in Jettys thread pool.httpClientMaxThreadsnullCamel 2.11: Producer only: To set a value for maximum number of threads in HttpClient thread pool. This setting override any setting configured on component level. Notice that both a min and max size must be configured. If not set it default to max 16 threads used
[1/2] camel git commit: Fixed component docs
Repository: camel Updated Branches: refs/heads/camel-2.16.x 13c0c3bd1 -> c0e14fe10 refs/heads/master 57c79a900 -> 12784edcc Fixed component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/12784edc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/12784edc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/12784edc Branch: refs/heads/master Commit: 12784edccf33f1163fa34d2ff9eac2e317b183fb Parents: 57c79a9 Author: Claus IbsenAuthored: Tue Jan 5 19:18:39 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:18:39 2016 +0100 -- .../java/org/apache/camel/component/flatpack/FlatpackEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/12784edc/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java -- diff --git a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java index 080c5b4..fb393a3 100644 --- a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java +++ b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java @@ -52,7 +52,7 @@ public class FlatpackEndpoint extends DefaultPollingEndpoint { private LoadBalancer loadBalancer = new RoundRobinLoadBalancer(); private ParserFactory parserFactory = DefaultParserFactory.getInstance(); -@UriPath @Metadata(required = "true") +@UriPath @Metadata(required = "false", defaultValue = "delim") private FlatpackType type; @UriPath @Metadata(required = "true") private String resourceUri;
[2/2] camel git commit: Fixed component docs
Fixed component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c0e14fe1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c0e14fe1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c0e14fe1 Branch: refs/heads/camel-2.16.x Commit: c0e14fe10e5bdb785ff07c00b333fd6a3f00ba9e Parents: 13c0c3b Author: Claus IbsenAuthored: Tue Jan 5 19:18:39 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:20:07 2016 +0100 -- .../java/org/apache/camel/component/flatpack/FlatpackEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c0e14fe1/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java -- diff --git a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java index e6c9111..5a3e677 100644 --- a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java +++ b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java @@ -54,7 +54,7 @@ public class FlatpackEndpoint extends DefaultPollingEndpoint { private LoadBalancer loadBalancer = new RoundRobinLoadBalancer(); private ParserFactory parserFactory = DefaultParserFactory.getInstance(); -@UriPath @Metadata(required = "true") +@UriPath @Metadata(required = "false", defaultValue = "delim") private FlatpackType type; @UriPath @Metadata(required = "true") private String resourceUri;
[5/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8a80d086 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8a80d086 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8a80d086 Branch: refs/heads/camel-2.16.x Commit: 8a80d086dabed6c2d240ec5f5d010f0740c0bd41 Parents: b95b348 Author: Claus IbsenAuthored: Tue Jan 5 19:02:48 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:10:02 2016 +0100 -- .../org/apache/camel/component/netty/NettyConfiguration.java | 8 .../component/netty/NettyServerBootstrapConfiguration.java | 1 + 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/8a80d086/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java -- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java index afb22b6..ddbc2b7 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java @@ -56,7 +56,15 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem private int decoderMaxLineLength = 1024; @UriParam private String encoding; +@UriParam(description = "To use a single encoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler encoder; +@UriParam(javaType = "java.lang.String") private List encoders = new ArrayList(); +@UriParam(description = "To use a single decoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler decoder; +@UriParam(javaType = "java.lang.String") private List decoders = new ArrayList(); @UriParam private boolean disconnect; http://git-wip-us.apache.org/repos/asf/camel/blob/8a80d086/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java -- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java index 5e080ff..29aa309 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java @@ -65,6 +65,7 @@ public class NettyServerBootstrapConfiguration implements Cloneable { protected ServerPipelineFactory serverPipelineFactory; @UriParam(label = "consumer,advanced") protected NettyServerBootstrapFactory nettyServerBootstrapFactory; +@UriParam(label = "advanced", prefix = "option.", multiValue = true) protected Map options; // SSL options is also part of the server bootstrap as the server listener on port X is either plain or SSL @UriParam(label = "security")
[2/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d1a9209d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d1a9209d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d1a9209d Branch: refs/heads/master Commit: d1a9209d5fcde605008731a6fc80308e8c198303 Parents: 9a3cd3e Author: Claus IbsenAuthored: Tue Jan 5 19:02:48 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:02:48 2016 +0100 -- .../org/apache/camel/component/netty/NettyConfiguration.java | 8 .../component/netty/NettyServerBootstrapConfiguration.java | 1 + 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d1a9209d/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java -- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java index afb22b6..ddbc2b7 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java @@ -56,7 +56,15 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem private int decoderMaxLineLength = 1024; @UriParam private String encoding; +@UriParam(description = "To use a single encoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler encoder; +@UriParam(javaType = "java.lang.String") private List encoders = new ArrayList(); +@UriParam(description = "To use a single decoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler decoder; +@UriParam(javaType = "java.lang.String") private List decoders = new ArrayList(); @UriParam private boolean disconnect; http://git-wip-us.apache.org/repos/asf/camel/blob/d1a9209d/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java -- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java index 5e080ff..29aa309 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java @@ -65,6 +65,7 @@ public class NettyServerBootstrapConfiguration implements Cloneable { protected ServerPipelineFactory serverPipelineFactory; @UriParam(label = "consumer,advanced") protected NettyServerBootstrapFactory nettyServerBootstrapFactory; +@UriParam(label = "advanced", prefix = "option.", multiValue = true) protected Map options; // SSL options is also part of the server bootstrap as the server listener on port X is either plain or SSL @UriParam(label = "security")
[4/6] camel git commit: Polished
Polished Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b95b3489 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b95b3489 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b95b3489 Branch: refs/heads/camel-2.16.x Commit: b95b34893a274bb36bcca4c012b69e0704d16d87 Parents: 0e2bf50 Author: Claus IbsenAuthored: Tue Jan 5 18:47:39 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:09:54 2016 +0100 -- .../component/netty/http/NettyHttpBridgeEncodedPathTest.java | 6 +++--- .../component/netty4/http/NettyHttpBridgeEncodedPathTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b95b3489/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpBridgeEncodedPathTest.java -- diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpBridgeEncodedPathTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpBridgeEncodedPathTest.java index 71c0580..25a3bff 100644 --- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpBridgeEncodedPathTest.java +++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpBridgeEncodedPathTest.java @@ -52,11 +52,11 @@ public class NettyHttpBridgeEncodedPathTest extends BaseNettyTest { exchange.getOut().setBody(exchange.getIn().getHeader(Exchange.HTTP_QUERY)); } }; -from("netty-http://http://localhost:; + port2 + "/nettyTestRouteA?matchOnUriPrefix=true") +from("netty-http:http://localhost:; + port2 + "/nettyTestRouteA?matchOnUriPrefix=true") .log("Using NettyTestRouteA route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]") -.to("netty-http://http://localhost:; + port1 + "/nettyTestRouteB?throwExceptionOnFailure=false=true"); +.to("netty-http:http://localhost:; + port1 + "/nettyTestRouteB?throwExceptionOnFailure=false=true"); -from("netty-http://http://localhost:; + port1 + "/nettyTestRouteB?matchOnUriPrefix=true") +from("netty-http:http://localhost:; + port1 + "/nettyTestRouteB?matchOnUriPrefix=true") .log("Using NettyTestRouteB route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]") .process(serviceProc); } http://git-wip-us.apache.org/repos/asf/camel/blob/b95b3489/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpBridgeEncodedPathTest.java -- diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpBridgeEncodedPathTest.java b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpBridgeEncodedPathTest.java index 59c82f6..a2c9b3c 100644 --- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpBridgeEncodedPathTest.java +++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpBridgeEncodedPathTest.java @@ -52,11 +52,11 @@ public class NettyHttpBridgeEncodedPathTest extends BaseNettyTest { exchange.getOut().setBody(exchange.getIn().getHeader(Exchange.HTTP_QUERY)); } }; -from("netty4-http://http://localhost:; + port2 + "/nettyTestRouteA?matchOnUriPrefix=true") +from("netty4-http:http://localhost:; + port2 + "/nettyTestRouteA?matchOnUriPrefix=true") .log("Using NettyTestRouteA route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]") -.to("netty4-http://http://localhost:; + port1 + "/nettyTestRouteB?throwExceptionOnFailure=false=true"); +.to("netty4-http:http://localhost:; + port1 + "/nettyTestRouteB?throwExceptionOnFailure=false=true"); -from("netty4-http://http://localhost:; + port1 + "/nettyTestRouteB?matchOnUriPrefix=true") +from("netty4-http:http://localhost:; + port1 + "/nettyTestRouteB?matchOnUriPrefix=true") .log("Using NettyTestRouteB route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]") .process(serviceProc); }
[6/6] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/13c0c3bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/13c0c3bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/13c0c3bd Branch: refs/heads/camel-2.16.x Commit: 13c0c3bd1e3b050db06d63ccb2d337b4048d4038 Parents: 8a80d08 Author: Claus IbsenAuthored: Tue Jan 5 19:09:27 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 19:10:08 2016 +0100 -- .../apache/camel/component/netty4/NettyConfiguration.java| 8 .../component/netty4/NettyServerBootstrapConfiguration.java | 1 + 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/13c0c3bd/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java -- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java index 7a447f5..7f33e39 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java @@ -56,7 +56,15 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem private int decoderMaxLineLength = 1024; @UriParam private String encoding; +@UriParam(description = "To use a single encoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler encoder; +@UriParam(javaType = "java.lang.String") private List encoders = new ArrayList(); +@UriParam(description = "To use a single decoder. This options is deprecated use encoders instead.") +@Deprecated +private ChannelHandler decoder; +@UriParam(javaType = "java.lang.String") private List decoders = new ArrayList(); @UriParam private boolean disconnect; http://git-wip-us.apache.org/repos/asf/camel/blob/13c0c3bd/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java -- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java index f790fe6..5221040 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java @@ -63,6 +63,7 @@ public class NettyServerBootstrapConfiguration implements Cloneable { protected ServerInitializerFactory serverInitializerFactory; @UriParam(label = "consumer,advanced") protected NettyServerBootstrapFactory nettyServerBootstrapFactory; +@UriParam(label = "advanced", prefix = "option.", multiValue = true) protected Map options; // SSL options is also part of the server bootstrap as the server listener on port X is either plain or SSL @UriParam(label = "security")
[2/2] camel git commit: CAMEL-9472: Add multi value to component docs
CAMEL-9472: Add multi value to component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aea0bef8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aea0bef8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aea0bef8 Branch: refs/heads/camel-2.16.x Commit: aea0bef84c47c69f25eb4079358505a114c4f1f7 Parents: c769389 Author: Claus IbsenAuthored: Tue Jan 5 15:43:11 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 15:43:50 2016 +0100 -- .../camel/component/sql/DefaultSqlEndpoint.java | 14 ++ .../org/apache/camel/component/sql/SqlComponent.java | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/aea0bef8/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java index 67e8f23..17fcb68 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java @@ -110,6 +110,9 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint { @UriParam(label = "advanced", defaultValue = "#", description = "Specifies a character that will be replaced to ? in SQL query." + " Notice, that it is simple String.replaceAll() operation and no SQL parsing is involved (quoted strings will also change).") private String placeholder = "#"; +@UriParam(label = "advanced", prefix = "template.", multiValue = true, +description = "Configures the Spring JdbcTemplate with the key/values from the Map") +private Map templateOptions; public DefaultSqlEndpoint() { } @@ -415,6 +418,17 @@ public abstract class DefaultSqlEndpoint extends DefaultPollingEndpoint { this.placeholder = placeholder; } +public Map getTemplateOptions() { +return templateOptions; +} + +/** + * Configures the Spring JdbcTemplate with the key/values from the Map + */ +public void setTemplateOptions(Map templateOptions) { +this.templateOptions = templateOptions; +} + @SuppressWarnings("unchecked") public List queryForList(ResultSet rs, boolean allowMapToClass) throws SQLException { if (allowMapToClass && outputClass != null) { http://git-wip-us.apache.org/repos/asf/camel/blob/aea0bef8/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java index 0446520..460b4f3 100755 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java @@ -77,7 +77,8 @@ public class SqlComponent extends UriEndpointComponent { String parameterPlaceholderSubstitute = getAndRemoveParameter(parameters, "placeholder", String.class, "#"); JdbcTemplate jdbcTemplate = new JdbcTemplate(target); -IntrospectionSupport.setProperties(jdbcTemplate, parameters, "template."); +Map templateOptions = IntrospectionSupport.extractProperties(parameters, "template."); +IntrospectionSupport.setProperties(jdbcTemplate, templateOptions); String query = remaining.replaceAll(parameterPlaceholderSubstitute, "?"); @@ -110,6 +111,7 @@ public class SqlComponent extends UriEndpointComponent { endpoint.setOnConsumeBatchComplete(onConsumeBatchComplete); endpoint.setDataSource(ds); endpoint.setDataSourceRef(dataSourceRef); +endpoint.setTemplateOptions(templateOptions); return endpoint; }
[1/2] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Repository: camel Updated Branches: refs/heads/camel-2.16.x 3d69dc7a7 -> e9cdfbafe refs/heads/master de0a507a3 -> 95fceb73c Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/95fceb73 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/95fceb73 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/95fceb73 Branch: refs/heads/master Commit: 95fceb73c1c40aa950a39028eb10e5e1abce8045 Parents: de0a507 Author: Claus IbsenAuthored: Tue Jan 5 12:46:55 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 12:46:55 2016 +0100 -- .../java/org/apache/camel/catalog/CamelCatalog.java | 16 +++- .../apache/camel/catalog/DefaultCamelCatalog.java | 8 +++- .../org/apache/camel/catalog/CamelCatalogTest.java | 7 ++- 3 files changed, 28 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/95fceb73/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java index 4d3f5e4..f1c2bb6 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java @@ -191,7 +191,7 @@ public interface CamelCatalog { Map endpointProperties(String uri) throws URISyntaxException; /** - * Parses and validates the endpoint uri and constructs a key/value properties of each option + * Parses and validates the endpoint uri and constructs a key/value properties of each option. * * @param uri the endpoint uri * @return validation result @@ -199,6 +199,20 @@ public interface CamelCatalog { EndpointValidationResult validateEndpointProperties(String uri); /** + * Parses and validates the endpoint uri and constructs a key/value properties of each option. + * + * The option ignoreLenientProperties can be used to ignore components that uses lenient properties. + * When this is true, then the uri validation is stricter but would fail on properties that are not part of the component + * but in the uri because of using lenient properties. + * For example using the HTTP components to provide query parameters in the endpoint uri. + * + * @param uri the endpoint uri + * @param ignoreLenientProperties whether to ignore components that uses lenient properties. + * @return validation result + */ +EndpointValidationResult validateEndpointProperties(String uri, boolean ignoreLenientProperties); + +/** * Parses and validates the simple expression. * * Important: This requires having camel-core on the classpath http://git-wip-us.apache.org/repos/asf/camel/blob/95fceb73/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 5a023c9..6c5c444 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -733,6 +733,11 @@ public class DefaultCamelCatalog implements CamelCatalog { @Override public EndpointValidationResult validateEndpointProperties(String uri) { +return validateEndpointProperties(uri, false); +} + +@Override +public EndpointValidationResult validateEndpointProperties(String uri, boolean ignoreLenientProperties) { EndpointValidationResult result = new EndpointValidationResult(uri); Map properties; @@ -751,7 +756,8 @@ public class DefaultCamelCatalog implements CamelCatalog { } rows = JSonSchemaHelper.parseJsonSchema("component", json, false); -lenientProperties = isComponentLenientProperties(rows); +// only enable lenient properties if we should not ignore +lenientProperties = !ignoreLenientProperties && isComponentLenientProperties(rows); rows = JSonSchemaHelper.parseJsonSchema("properties", json, true); properties = endpointProperties(uri); http://git-wip-us.apache.org/repos/asf/camel/blob/95fceb73/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
[2/2] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9cdfbaf Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9cdfbaf Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9cdfbaf Branch: refs/heads/camel-2.16.x Commit: e9cdfbafee708cee3df63e69bdf7f94865d3ca9c Parents: 3d69dc7 Author: Claus IbsenAuthored: Tue Jan 5 12:46:55 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 12:47:22 2016 +0100 -- .../java/org/apache/camel/catalog/CamelCatalog.java | 16 +++- .../apache/camel/catalog/DefaultCamelCatalog.java | 8 +++- .../org/apache/camel/catalog/CamelCatalogTest.java | 7 ++- 3 files changed, 28 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e9cdfbaf/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java index 4d3f5e4..f1c2bb6 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java @@ -191,7 +191,7 @@ public interface CamelCatalog { Map endpointProperties(String uri) throws URISyntaxException; /** - * Parses and validates the endpoint uri and constructs a key/value properties of each option + * Parses and validates the endpoint uri and constructs a key/value properties of each option. * * @param uri the endpoint uri * @return validation result @@ -199,6 +199,20 @@ public interface CamelCatalog { EndpointValidationResult validateEndpointProperties(String uri); /** + * Parses and validates the endpoint uri and constructs a key/value properties of each option. + * + * The option ignoreLenientProperties can be used to ignore components that uses lenient properties. + * When this is true, then the uri validation is stricter but would fail on properties that are not part of the component + * but in the uri because of using lenient properties. + * For example using the HTTP components to provide query parameters in the endpoint uri. + * + * @param uri the endpoint uri + * @param ignoreLenientProperties whether to ignore components that uses lenient properties. + * @return validation result + */ +EndpointValidationResult validateEndpointProperties(String uri, boolean ignoreLenientProperties); + +/** * Parses and validates the simple expression. * * Important: This requires having camel-core on the classpath http://git-wip-us.apache.org/repos/asf/camel/blob/e9cdfbaf/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 5a023c9..6c5c444 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -733,6 +733,11 @@ public class DefaultCamelCatalog implements CamelCatalog { @Override public EndpointValidationResult validateEndpointProperties(String uri) { +return validateEndpointProperties(uri, false); +} + +@Override +public EndpointValidationResult validateEndpointProperties(String uri, boolean ignoreLenientProperties) { EndpointValidationResult result = new EndpointValidationResult(uri); Map properties; @@ -751,7 +756,8 @@ public class DefaultCamelCatalog implements CamelCatalog { } rows = JSonSchemaHelper.parseJsonSchema("component", json, false); -lenientProperties = isComponentLenientProperties(rows); +// only enable lenient properties if we should not ignore +lenientProperties = !ignoreLenientProperties && isComponentLenientProperties(rows); rows = JSonSchemaHelper.parseJsonSchema("properties", json, true); properties = endpointProperties(uri); http://git-wip-us.apache.org/repos/asf/camel/blob/e9cdfbaf/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java -- diff --git
[1/2] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Repository: camel Updated Branches: refs/heads/camel-2.16.x 9c95ebd05 -> 3d69dc7a7 refs/heads/master 0ead2cac3 -> de0a507a3 Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/de0a507a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/de0a507a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/de0a507a Branch: refs/heads/master Commit: de0a507a33c7d02f9edef1f1e8edbcaa3f6d7915 Parents: 0ead2ca Author: Claus IbsenAuthored: Tue Jan 5 12:36:39 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 12:36:39 2016 +0100 -- .../java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java | 2 +- .../java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/de0a507a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java -- diff --git a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java b/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java index d8c76c4..c6d766f 100644 --- a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java +++ b/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java @@ -29,7 +29,7 @@ import org.apache.camel.spi.UriEndpoint; * The jetty component provides HTTP-based endpoints for consuming and producing HTTP requests. */ @UriEndpoint(scheme = "jetty", extendsScheme = "http", title = "Jetty", -syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http") +syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http", lenientProperties = true) public class JettyHttpEndpoint8 extends JettyHttpEndpoint { public JettyHttpEndpoint8(JettyHttpComponent component, String uri, URI httpURL) throws URISyntaxException { http://git-wip-us.apache.org/repos/asf/camel/blob/de0a507a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java -- diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java index 30d62ab..c37908c 100644 --- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java +++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java @@ -30,7 +30,7 @@ import org.apache.camel.spi.UriEndpoint; * The jetty component provides HTTP-based endpoints for consuming and producing HTTP requests. */ @UriEndpoint(scheme = "jetty", extendsScheme = "http", title = "Jetty 9", -syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http") +syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http", lenientProperties = true) public class JettyHttpEndpoint9 extends JettyHttpEndpoint { private HttpBinding binding;
[2/2] camel git commit: Camel component docs - Should include information if an endpoint is lenient properties
Camel component docs - Should include information if an endpoint is lenient properties Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3d69dc7a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3d69dc7a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3d69dc7a Branch: refs/heads/camel-2.16.x Commit: 3d69dc7a7bbf7d029cc473839b073fcfd7d0897b Parents: 9c95ebd Author: Claus IbsenAuthored: Tue Jan 5 12:36:39 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 12:37:03 2016 +0100 -- .../java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java | 2 +- .../java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3d69dc7a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java -- diff --git a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java b/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java index 59f8637..4baaf72 100644 --- a/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java +++ b/components/camel-jetty8/src/main/java/org/apache/camel/component/jetty8/JettyHttpEndpoint8.java @@ -26,7 +26,7 @@ import org.apache.camel.http.common.HttpConsumer; import org.apache.camel.spi.UriEndpoint; @UriEndpoint(scheme = "jetty", extendsScheme = "http", title = "Jetty", -syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http") +syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http", lenientProperties = true) public class JettyHttpEndpoint8 extends JettyHttpEndpoint { public JettyHttpEndpoint8(JettyHttpComponent component, String uri, URI httpURL) throws URISyntaxException { http://git-wip-us.apache.org/repos/asf/camel/blob/3d69dc7a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java -- diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java index b6f46dd..b35575a 100644 --- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java +++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyHttpEndpoint9.java @@ -27,7 +27,7 @@ import org.apache.camel.http.common.HttpConsumer; import org.apache.camel.spi.UriEndpoint; @UriEndpoint(scheme = "jetty", extendsScheme = "http", title = "Jetty 9", -syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http") +syntax = "jetty:httpUri", consumerClass = HttpConsumer.class, label = "http", lenientProperties = true) public class JettyHttpEndpoint9 extends JettyHttpEndpoint { private HttpBinding binding;
[2/2] camel git commit: Camel component docs
Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c769389b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c769389b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c769389b Branch: refs/heads/camel-2.16.x Commit: c769389b5f7154fab327fd93ecf0c5b5f32428ea Parents: d739530 Author: Claus IbsenAuthored: Tue Jan 5 13:49:00 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 14:02:51 2016 +0100 -- .../org/apache/camel/component/file/remote/FtpEndpoint.java| 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c769389b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java index 99c7648..0646643 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java @@ -39,7 +39,6 @@ import org.apache.commons.net.ftp.FTPFile; @UriEndpoint(scheme = "ftp", extendsScheme = "file", title = "FTP", syntax = "ftp:host:port/directoryName", consumerClass = FtpConsumer.class, label = "file") public class FtpEndpoint extends RemoteFileEndpoint { -protected FTPClient ftpClient; protected int soTimeout; protected int dataTimeout; @@ -51,6 +50,8 @@ public class FtpEndpoint extends RemoteFileEndpoint protected Map ftpClientConfigParameters; @UriParam(label = "advanced", prefix = "ftpClient.", multiValue = true) protected Map ftpClientParameters; +@UriParam(label = "advanced") +protected FTPClient ftpClient; public FtpEndpoint() { } @@ -184,6 +185,9 @@ public class FtpEndpoint extends RemoteFileEndpoint return ftpClient; } +/** + * To use a custom instance of FTPClient + */ public void setFtpClient(FTPClient ftpClient) { this.ftpClient = ftpClient; }
[1/2] camel git commit: Camel component docs
Repository: camel Updated Branches: refs/heads/camel-2.16.x d739530db -> c769389b5 refs/heads/master 3690b9d24 -> f80881c01 Camel component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f80881c0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f80881c0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f80881c0 Branch: refs/heads/master Commit: f80881c01ce654aea10c7926273adb3ca6aadac9 Parents: 3690b9d Author: Claus IbsenAuthored: Tue Jan 5 13:49:00 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 13:49:00 2016 +0100 -- .../org/apache/camel/component/file/remote/FtpEndpoint.java| 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f80881c0/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java index e87e74b..87152ac 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java @@ -39,7 +39,6 @@ import org.apache.commons.net.ftp.FTPFile; @UriEndpoint(scheme = "ftp", extendsScheme = "file", title = "FTP", syntax = "ftp:host:port/directoryName", consumerClass = FtpConsumer.class, label = "file") public class FtpEndpoint extends RemoteFileEndpoint { -protected FTPClient ftpClient; protected int soTimeout; protected int dataTimeout; @@ -51,6 +50,8 @@ public class FtpEndpoint extends RemoteFileEndpoint protected Map ftpClientConfigParameters; @UriParam(label = "advanced", prefix = "ftpClient.", multiValue = true) protected Map ftpClientParameters; +@UriParam(label = "advanced") +protected FTPClient ftpClient; public FtpEndpoint() { } @@ -184,6 +185,9 @@ public class FtpEndpoint extends RemoteFileEndpoint return ftpClient; } +/** + * To use a custom instance of FTPClient + */ public void setFtpClient(FTPClient ftpClient) { this.ftpClient = ftpClient; }
svn commit: r977125 - in /websites/production/camel/content: cache/main.pageCache mllp.html
Author: buildbot Date: Tue Jan 5 23:19:09 2016 New Revision: 977125 Log: Production update by buildbot for camel Added: websites/production/camel/content/mllp.html Modified: websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Added: websites/production/camel/content/mllp.html == --- websites/production/camel/content/mllp.html (added) +++ websites/production/camel/content/mllp.html Tue Jan 5 23:19:09 2016 @@ -0,0 +1,147 @@ +http://www.w3.org/TR/html4/loose.dtd;> + + + + + + + + + + + + + .maincontent { overflow:hidden; } + + + + + + +Apache Camel: MLLP + + + + + + + + + + + + + + + + + +http://camel.apache.org/;>Camel +http://www.apache.org;>Apache + + + + + + +Apache CamelDocumentationComponentsMLLP + + +Download | JavaDoc | Source | Forums | Support + + + + + + + +The MLLP component is used for exchanging messages with external systems using the HL7 MLLP application protocol.The component supports the following:A Camel consumer using a TCP ServerA Camel producer using a TCP ClientThe MLLP component uses byte[] payloads, and relies on Camel Type Conversion to convert byte[] to other types. Maven users will need to add the following dependency to their pom.xml for this component:dependencygroupIdorg.apache.camel/groupIdartifactIdcamel-mllp/artifactIdversionx.x.x/version!-- use the same version as your Camel core version --/dependencyMLLP >ConsumerThe MLLP Consumer supports receiving MLLP-framed messages and >sending HL7 Acknowledgements. The MLLP Consumer can automatically >generate the HL7 Acknowledgement, or the acknowledgement can be specified >using theCamelMllpAcknowledgement exchange property.class="p1">Message Headersclass="p2">The MLLP Consumer adds these headers on the Camel >message:class="confluenceTable">class="confluenceTd">class="s1">Keyclass="confluenceTd">MSH >fieldclass="confluenceTd">class="s1">Examplerowspan="1" class="confluenc eTd">CamelMllpLocalAddressCamelMllpRemoteAddressCamelMllpSendingApplicationMSH-3MYSERVERCamelMllpSendingFacilityMSH-4MYSERVERAPPCamelMllpReceivingApplicationMSH-5MYCLIENTCamelMllpReceivingFacilityMSH-6MYCLIENTAPPCamelMllpTimestampMSH-720071231235900rowspan="1" class="confluenceTd">class="s1">CamelMllpSecurityclass="confluenceTd">MSH-8colspan="1" rowspan="1" class="confluenceTd">class="s1">nullclass="confluenceTd">CamelMllpMessageTypecolspan="1" rowspan="1" class="confluenceTd">MSH-9colspan="1" rowspan="1" class="confluenceTd">class="s1">ADT^A04class="confluenceTd">CamelMllpEventTyperowspan="1" class="confluenceTd">MSH-9-1colspan="1" rowspan="1" class="confluenceTd">class="s1">AD4class="confluenceTd">CamelMllpTriggerEventMSH-9-2A04CamelMllpMessageControlIdMSH-1012345CamelMllpProcessingIdMSH-11PCamelMllpVersionIdMSH-122.4CamelMllpCharsetMSH-18All headersareStringtypes. If a header value is missing, its value isnull.MLLP ProducerThe MLLP Producer supports sending MLLP-framed messages and receiving HL7 Acknowledgements. The MLLP Producer interrogates the HL7 Acknowledgments and raises exceptions if a negative acknowledgement is received. Message HeadersThe MLLP Producer adds these headers on the Camel message:KeyMSH fieldExampleCamelMllpLocalAddressCamelMllpRemoteAddressCamelMllpAcknowledgementCamelMllpAcknowledgementTypeAACamelMllpSendingApplicationMSH-3MYSERVERCamelMllpSendingFacilityMSH-4MYSERVERAPPCamelMllpReceivingApplicationMSH-5MYCLIENTCamelMllpReceivingFacilityMSH-6MYCLIENTAPPCamelMllpTimestampMSH-720071231235900CamelMllpSecurityMSH-8nullCamelMllpMessageTypeMSH-9ADT^A04CamelMllpEventTypeMSH-9-1AD4CamelMllpTriggerEventMSH-9-2A04CamelMllpMessageControlIdMSH-1012345CamelMllpProcessingIdMSH-11PCamelMllpVersionIdMSH-122.4CamelMllpCharsetMSH-18< /tbody>All headersareStringtypes. If a header value is missing, its value isnull. + + + + + +OverviewHomeDownloadGetting StartedFAQDocumentationUser GuideManualBooksTutorialsExamplesCookbookArchitectureEnterprise Integration PatternsDSLComponentsData FormatLanguagesSecuritySecurity AdvisoriesSearchhttp://www.google.com/cse;> + + + + + + + +http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en">CommunitySupportContributingDiscussion ForumsMailing ListsUser StoriesNewsArticlesSiteTeamhttp://camel-extra.googlecode.com/; rel="nofollow">Camel ExtraDevelopersDeveloper Guideshape="rect" href="source.html">Sourcehref="building.html">Buildinghref="javadoc.html">JavaDochref="irc-room.html">IRC
[1/2] camel git commit: Camel catalog - Improve validation of dataformat endpoint as we can use the df scheme to validate its options.
Repository: camel Updated Branches: refs/heads/camel-2.16.x e9cdfbafe -> d739530db refs/heads/master 95fceb73c -> 3690b9d24 Camel catalog - Improve validation of dataformat endpoint as we can use the df scheme to validate its options. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3690b9d2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3690b9d2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3690b9d2 Branch: refs/heads/master Commit: 3690b9d249f71d8f0e7b9ab9bf2bb46404d50275 Parents: 95fceb7 Author: Claus IbsenAuthored: Tue Jan 5 13:32:59 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 13:32:59 2016 +0100 -- .../org/apache/camel/catalog/DefaultCamelCatalog.java | 13 + .../org/apache/camel/catalog/CamelCatalogTest.java | 4 2 files changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3690b9d2/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 6c5c444..f04bd3f 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -766,6 +766,19 @@ public class DefaultCamelCatalog implements CamelCatalog { return result; } +// the dataformat component refers to a data format so lets add the properties for the selected +// data format to the list of rows +if ("dataformat".equals(scheme)) { +String dfName = properties.get("name"); +if (dfName != null) { +String dfJson = dataFormatJSonSchema(dfName); +List
[2/2] camel git commit: Camel catalog - Improve validation of dataformat endpoint as we can use the df scheme to validate its options.
Camel catalog - Improve validation of dataformat endpoint as we can use the df scheme to validate its options. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d739530d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d739530d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d739530d Branch: refs/heads/camel-2.16.x Commit: d739530dbf7da5eb2b5aa903593d3dce3f057b48 Parents: e9cdfba Author: Claus IbsenAuthored: Tue Jan 5 13:32:59 2016 +0100 Committer: Claus Ibsen Committed: Tue Jan 5 13:33:51 2016 +0100 -- .../org/apache/camel/catalog/DefaultCamelCatalog.java | 13 + .../org/apache/camel/catalog/CamelCatalogTest.java | 4 2 files changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d739530d/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java -- diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java index 6c5c444..f04bd3f 100644 --- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java +++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java @@ -766,6 +766,19 @@ public class DefaultCamelCatalog implements CamelCatalog { return result; } +// the dataformat component refers to a data format so lets add the properties for the selected +// data format to the list of rows +if ("dataformat".equals(scheme)) { +String dfName = properties.get("name"); +if (dfName != null) { +String dfJson = dataFormatJSonSchema(dfName); +List