[1/2] camel git commit: Fixed the CS error of camel-flatpack
Repository: camel Updated Branches: refs/heads/master 22d596737 - 21f69939d Fixed the CS error of camel-flatpack Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/21f69939 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/21f69939 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/21f69939 Branch: refs/heads/master Commit: 21f69939ddb463b18fa603e36510f0011aba2a2c Parents: 68a0d0f Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Jan 9 21:51:30 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Jan 9 21:51:52 2015 +0800 -- .../org/apache/camel/component/flatpack/FlatpackEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/21f69939/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 a8789cc..3d24363 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 @@ -49,14 +49,14 @@ import org.apache.camel.util.ResourceHelper; */ @UriEndpoint(scheme = flatpack, consumerClass = FlatpackConsumer.class, label = transformation) public class FlatpackEndpoint extends DefaultPollingEndpoint { +@UriPath +protected String resourceUri; private LoadBalancer loadBalancer = new RoundRobinLoadBalancer(); private ParserFactory parserFactory = DefaultParserFactory.getInstance(); - + @UriPath private FlatpackType type; -@UriPath -protected String resourceUri; @UriParam(defaultValue = true) private boolean splitRows = true;
[2/2] camel git commit: Fixed CS errors of camel-mybatis
Fixed CS errors of camel-mybatis Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/68a0d0f9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/68a0d0f9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/68a0d0f9 Branch: refs/heads/master Commit: 68a0d0f96fbf416178f8d2b37bc3fc0074f40641 Parents: 22d5967 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Jan 9 21:51:04 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Jan 9 21:51:52 2015 +0800 -- .../apache/camel/component/mybatis/MyBatisEndpoint.java | 12 ++-- .../apache/camel/component/mybatis/MyBatisProducer.java | 12 ++-- .../MyBatisInsertWithInputAndOutputHeaderTest.java | 8 .../mybatis/MyBatisInsertWithInputHeaderTest.java | 4 ++-- .../MyBatisSelectOneWithInputAndOutputHeaderTest.java | 8 .../mybatis/MyBatisSelectOneWithInputHeaderTest.java| 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/68a0d0f9/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java -- diff --git a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java index 0a2dbbf..ea77ec2 100644 --- a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java +++ b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisEndpoint.java @@ -159,9 +159,9 @@ public class MyBatisEndpoint extends DefaultPollingEndpoint { this.outputHeader = outputHeader; } - public String getInputHeader() { - return inputHeader; - } +public String getInputHeader() { +return inputHeader; +} /** * User the header value for input parameters instead of the message body. @@ -169,9 +169,9 @@ public class MyBatisEndpoint extends DefaultPollingEndpoint { * If outputHeader is set, the value is used and query parameters will be taken from the * header instead of the body. */ - public void setInputHeader(String inputHeader) { - this.inputHeader = inputHeader; - } +public void setInputHeader(String inputHeader) { +this.inputHeader = inputHeader; +} http://git-wip-us.apache.org/repos/asf/camel/blob/68a0d0f9/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java -- diff --git a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java index dbe2fbd..6989a57 100644 --- a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java +++ b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java @@ -283,12 +283,12 @@ public class MyBatisProducer extends DefaultProducer { } private Object getInput(final Exchange exchange) { - final String inputHeader = getEndpoint().getInputHeader(); - if(inputHeader != null) { - return exchange.getIn().getHeader(inputHeader); - } else { - return exchange.getIn().getBody(); - } +final String inputHeader = getEndpoint().getInputHeader(); +if (inputHeader != null) { +return exchange.getIn().getHeader(inputHeader); +} else { +return exchange.getIn().getBody(); +} } } http://git-wip-us.apache.org/repos/asf/camel/blob/68a0d0f9/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertWithInputAndOutputHeaderTest.java -- diff --git a/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertWithInputAndOutputHeaderTest.java b/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertWithInputAndOutputHeaderTest.java index 1202f12..b18bdc8 100644 --- a/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertWithInputAndOutputHeaderTest.java +++ b/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertWithInputAndOutputHeaderTest.java @@ -22,10 +22,10 @@ import org.junit.Test; public class MyBatisInsertWithInputAndOutputHeaderTest extends MyBatisTestSupport { - private static final String TEST_CASE_INPUT_HEADER_NAME =
[2/2] camel git commit: CAMEL-8213: Fixed potential NPE in agg strategy.
CAMEL-8213: Fixed potential NPE in agg strategy. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ad73ccec Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ad73ccec Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ad73ccec Branch: refs/heads/camel-2.14.x Commit: ad73ccec92bb5d96c61b0d783766b8940c278d0e Parents: 34cd058 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jan 8 21:18:25 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 09:10:25 2015 +0100 -- .../processor/aggregate/UseOriginalAggregationStrategy.java| 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ad73ccec/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java index d6b7059..764151f 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java @@ -44,7 +44,11 @@ public class UseOriginalAggregationStrategy implements AggregationStrategy { if (propagateException) { Exception exception = checkException(oldExchange, newExchange); if (exception != null) { -original.setException(exception); +if (original != null) { +original.setException(exception); +} else { +oldExchange.setException(exception); +} } } return original != null ? original : oldExchange;
[1/2] camel git commit: CAMEL-8213: Fixed potential NPE in agg strategy.
Repository: camel Updated Branches: refs/heads/camel-2.13.x 387f571cd - 4ba6d4164 refs/heads/camel-2.14.x 34cd058ce - ad73ccec9 CAMEL-8213: Fixed potential NPE in agg strategy. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4ba6d416 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4ba6d416 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4ba6d416 Branch: refs/heads/camel-2.13.x Commit: 4ba6d4164d3ca237d0e9f692bdfff9d1627b7389 Parents: 387f571 Author: Claus Ibsen davscl...@apache.org Authored: Thu Jan 8 21:18:25 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 09:10:15 2015 +0100 -- .../processor/aggregate/UseOriginalAggregationStrategy.java| 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4ba6d416/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java index d6b7059..764151f 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/UseOriginalAggregationStrategy.java @@ -44,7 +44,11 @@ public class UseOriginalAggregationStrategy implements AggregationStrategy { if (propagateException) { Exception exception = checkException(oldExchange, newExchange); if (exception != null) { -original.setException(exception); +if (original != null) { +original.setException(exception); +} else { +oldExchange.setException(exception); +} } } return original != null ? original : oldExchange;
[1/2] camel git commit: CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested
Repository: camel Updated Branches: refs/heads/camel-2.13.x 4ba6d4164 - 1e7118362 refs/heads/camel-2.14.x ad73ccec9 - 97f92e59e CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/97f92e59 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/97f92e59 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/97f92e59 Branch: refs/heads/camel-2.14.x Commit: 97f92e59e95544db4ea313c73be9b75a40851f30 Parents: ad73cce Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Jan 9 16:30:19 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Jan 9 16:35:09 2015 +0800 -- .../main/java/org/apache/camel/TimeoutMap.java | 12 .../apache/camel/support/DefaultTimeoutMap.java | 19 ++- .../component/jms/reply/ReplyManagerSupport.java | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/97f92e59/camel-core/src/main/java/org/apache/camel/TimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java index ef5bda3..366f5c7 100644 --- a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java @@ -56,6 +56,18 @@ public interface TimeoutMapK, V extends Runnable { * ttnull/tt if there was no mapping for ttkey/tt. */ V put(K key, V value, long timeoutMillis); + +/** + * Adds the key value pair into the map if the specified key is not already associated with a value + * such that some time after the given timeout the entry will be evicted + * + * @param key the key + * @param value the value + * @param timeoutMillis timeout in millis + * @return the value associated with ttkey/tt, or + * ttnull/tt if there was no mapping for ttkey/tt. + */ +V putIfAbsent(K key, V value, long timeoutMillis); /** * Callback when the value has been evicted http://git-wip-us.apache.org/repos/asf/camel/blob/97f92e59/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java index 57462f1..29afe34 100644 --- a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java @@ -93,7 +93,7 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } return entry.getValue(); } - + public V put(K key, V value, long timeoutMillis) { TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); if (useLock) { @@ -109,6 +109,23 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } } } + +public V putIfAbsent(K key, V value, long timeoutMillis) { +TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); +if (useLock) { +lock.lock(); +} +try { +updateExpireTime(entry); +//Just make sure we don't override the old entry +TimeoutMapEntryK, V result = map.putIfAbsent(key, entry); +return result != null ? result.getValue() : null; +} finally { +if (useLock) { +lock.unlock(); +} +} +} public V remove(K key) { TimeoutMapEntryK, V entry; http://git-wip-us.apache.org/repos/asf/camel/blob/97f92e59/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java index ff2f344..30e5919 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java @@ -101,10 +101,10 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl // add to correlation map QueueReplyHandler handler = new QueueReplyHandler(replyManager, exchange, callback,
[2/2] camel git commit: CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested
CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1e711836 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1e711836 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1e711836 Branch: refs/heads/camel-2.13.x Commit: 1e7118362a3d06fa137393954bcd111a24220adc Parents: 4ba6d41 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Jan 9 16:30:19 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Jan 9 16:35:34 2015 +0800 -- .../main/java/org/apache/camel/TimeoutMap.java | 12 .../apache/camel/support/DefaultTimeoutMap.java | 19 ++- .../component/jms/reply/ReplyManagerSupport.java | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1e711836/camel-core/src/main/java/org/apache/camel/TimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java index ef5bda3..366f5c7 100644 --- a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java @@ -56,6 +56,18 @@ public interface TimeoutMapK, V extends Runnable { * ttnull/tt if there was no mapping for ttkey/tt. */ V put(K key, V value, long timeoutMillis); + +/** + * Adds the key value pair into the map if the specified key is not already associated with a value + * such that some time after the given timeout the entry will be evicted + * + * @param key the key + * @param value the value + * @param timeoutMillis timeout in millis + * @return the value associated with ttkey/tt, or + * ttnull/tt if there was no mapping for ttkey/tt. + */ +V putIfAbsent(K key, V value, long timeoutMillis); /** * Callback when the value has been evicted http://git-wip-us.apache.org/repos/asf/camel/blob/1e711836/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java index 6dcaf1d..55f0555 100644 --- a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java @@ -93,7 +93,7 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } return entry.getValue(); } - + public V put(K key, V value, long timeoutMillis) { TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); if (useLock) { @@ -109,6 +109,23 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } } } + +public V putIfAbsent(K key, V value, long timeoutMillis) { +TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); +if (useLock) { +lock.lock(); +} +try { +updateExpireTime(entry); +//Just make sure we don't override the old entry +TimeoutMapEntryK, V result = map.putIfAbsent(key, entry); +return result != null ? result.getValue() : null; +} finally { +if (useLock) { +lock.unlock(); +} +} +} public V remove(K key) { TimeoutMapEntryK, V entry; http://git-wip-us.apache.org/repos/asf/camel/blob/1e711836/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java index ff2f344..30e5919 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java @@ -101,10 +101,10 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl // add to correlation map QueueReplyHandler handler = new QueueReplyHandler(replyManager, exchange, callback, originalCorrelationId, correlationId, requestTimeout); -ReplyHandler result = correlation.put(correlationId, handler, requestTimeout); +
camel git commit: CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested
Repository: camel Updated Branches: refs/heads/master 4a01d60cc - 761a878e5 CAMEL-8204 Added the putIfAbsent method to avoid overriding the old key value as Claus suggested Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/761a878e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/761a878e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/761a878e Branch: refs/heads/master Commit: 761a878e557b7a42c4338492caca33877cc69724 Parents: 4a01d60 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Jan 9 16:30:19 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Jan 9 16:33:36 2015 +0800 -- .../main/java/org/apache/camel/TimeoutMap.java | 12 .../apache/camel/support/DefaultTimeoutMap.java | 19 ++- .../component/jms/reply/ReplyManagerSupport.java | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/761a878e/camel-core/src/main/java/org/apache/camel/TimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java index ef5bda3..366f5c7 100644 --- a/camel-core/src/main/java/org/apache/camel/TimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/TimeoutMap.java @@ -56,6 +56,18 @@ public interface TimeoutMapK, V extends Runnable { * ttnull/tt if there was no mapping for ttkey/tt. */ V put(K key, V value, long timeoutMillis); + +/** + * Adds the key value pair into the map if the specified key is not already associated with a value + * such that some time after the given timeout the entry will be evicted + * + * @param key the key + * @param value the value + * @param timeoutMillis timeout in millis + * @return the value associated with ttkey/tt, or + * ttnull/tt if there was no mapping for ttkey/tt. + */ +V putIfAbsent(K key, V value, long timeoutMillis); /** * Callback when the value has been evicted http://git-wip-us.apache.org/repos/asf/camel/blob/761a878e/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java -- diff --git a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java index 57462f1..29afe34 100644 --- a/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java +++ b/camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java @@ -93,7 +93,7 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } return entry.getValue(); } - + public V put(K key, V value, long timeoutMillis) { TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); if (useLock) { @@ -109,6 +109,23 @@ public class DefaultTimeoutMapK, V extends ServiceSupport implements TimeoutMa } } } + +public V putIfAbsent(K key, V value, long timeoutMillis) { +TimeoutMapEntryK, V entry = new TimeoutMapEntryK, V(key, value, timeoutMillis); +if (useLock) { +lock.lock(); +} +try { +updateExpireTime(entry); +//Just make sure we don't override the old entry +TimeoutMapEntryK, V result = map.putIfAbsent(key, entry); +return result != null ? result.getValue() : null; +} finally { +if (useLock) { +lock.unlock(); +} +} +} public V remove(K key) { TimeoutMapEntryK, V entry; http://git-wip-us.apache.org/repos/asf/camel/blob/761a878e/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java index ff2f344..30e5919 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java @@ -101,10 +101,10 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl // add to correlation map QueueReplyHandler handler = new QueueReplyHandler(replyManager, exchange, callback, originalCorrelationId, correlationId, requestTimeout); -
svn commit: r935579 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache hl7.html
Author: buildbot Date: Fri Jan 9 10:22:35 2015 New Revision: 935579 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/hl7.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 Fri Jan 9 10:22:35 2015 @@ -1360,11 +1360,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1420744767941 {padding: 0px;} -div.rbtoc1420744767941 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1420744767941 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1420798748751 {padding: 0px;} +div.rbtoc1420798748751 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1420798748751 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1420744767941 +/*]]*//style/pdiv class=toc-macro rbtoc1420798748751 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -4854,7 +4854,7 @@ hibernate:[entityClassName][?options] h3 id=BookComponentAppendix-SeeAlso.20See Also/h3 ullia shape=rect href=configuring-camel.htmlConfiguring Camel/a/lilia shape=rect href=component.htmlComponent/a/lilia shape=rect href=endpoint.htmlEndpoint/a/lilia shape=rect href=getting-started.htmlGetting Started/a/li/ul ul class=alternatelia shape=rect href=hibernate-example.htmlHibernate Example/a/li/ul -h2 id=BookComponentAppendix-HL7ComponentHL7 Component/h2pThe strongHL7/strong component is used for working with the HL7 MLLP protocol and a shape=rect class=external-link href=http://www.hl7.org/implement/standards/product_brief.cfm?product_id=185; rel=nofollowHL7 v2 messages/a using the a shape=rect class=external-link href=http://hl7api.sourceforge.net; rel=nofollowHAPI library/a./ppThis component supports the following:/pul class=alternateliHL7 MLLP codec for a shape=rect class=external-link href=http://mina.apache.org/;Mina/a/liliHL7 MLLP codec for#160;a shape=rect href=netty4.htmlNetty4/a from#160;strongCamel 2.15/strong onwards/lilia shape=rect href=type-converter.htmlType Converter/a from/to HAPI and String/liliHL7 DataFormat using the HAPI library/lili class=confluence-linkEven more ease-of-use as it's integrated well with the a shape=rect href=mina2.htmlcamel-mina2/a comp onent./li/ulpMaven users will need to add the following dependency to their codepom.xml/code for this component:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl +h2 id=BookComponentAppendix-HL7ComponentHL7 Component/h2pThe strongHL7/strong component is used for working with the HL7 MLLP protocol and a shape=rect class=external-link href=http://www.hl7.org/implement/standards/product_brief.cfm?product_id=185; rel=nofollowHL7 v2 messages/a using the a shape=rect class=external-link href=http://hl7api.sourceforge.net; rel=nofollowHAPI library/a./ppThis component supports the following:/pul class=alternateliHL7 MLLP codec for a shape=rect href=mina2.htmlMina/a/liliHL7 MLLP codec for#160;a shape=rect href=netty4.htmlNetty4/a from#160;strongCamel 2.15/strong onwards/lilia shape=rect href=type-converter.htmlType Converter/a from/to HAPI and String/liliHL7 DataFormat using the HAPI library/lili class=confluence-linkEven more ease-of-use as it's integrated well with the a shape=rect href=mina2.htmlcamel-mina2/a component./li/ulpMaven users will need to add the following dependency to their codepom.xml/code for this component:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: xml; gutter: false type=syntaxhighlighter![CDATA[lt;dependencygt; lt;groupIdgt;org.apache.camellt;/groupIdgt; lt;artifactIdgt;camel-hl7lt;/artifactIdgt; @@ -4862,8 +4862,8 @@ hibernate:[entityClassName][?options] lt;!-- use the same version as your Camel core version --gt; lt;/dependencygt; ]]/script -/div/divh3 id=BookComponentAppendix-HL7MLLPprotocolHL7 MLLP protocol/h3pHL7 is often used with the HL7 MLLP protocol, which is a text based TCP socket based protocol. This component ships with a Mina and Netty4 Codec that conforms to the MLLP protocol so you can easily
camel git commit: Adding another PGP DataFormat configuration option
Repository: camel Updated Branches: refs/heads/master 761a878e5 - 4ec817aa7 Adding another PGP DataFormat configuration option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4ec817aa Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4ec817aa Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4ec817aa Branch: refs/heads/master Commit: 4ec817aa7e2b9d605d17c506a3458c5a24db53c5 Parents: 761a878 Author: Colm O hEigeartaigh cohei...@apache.org Authored: Fri Jan 9 12:06:42 2015 + Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Fri Jan 9 12:06:42 2015 + -- .../apache/camel/model/dataformat/PGPDataFormat.java | 13 + 1 file changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4ec817aa/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java index 9f61420..c8a34a1 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java @@ -58,6 +58,8 @@ public class PGPDataFormat extends DataFormatDefinition { private Integer compressionAlgorithm; @XmlAttribute private Integer hashAlgorithm; +@XmlAttribute +private String signatureVerificationOption; public PGPDataFormat() { super(pgp); @@ -101,6 +103,9 @@ public class PGPDataFormat extends DataFormatDefinition { if (hashAlgorithm != null) { setProperty(camelContext, dataFormat, hashAlgorithm, hashAlgorithm); } +if (signatureVerificationOption != null) { +setProperty(camelContext, dataFormat, signatureVerificationOption, signatureVerificationOption); +} } public String getSignatureKeyUserid() { @@ -198,4 +203,12 @@ public class PGPDataFormat extends DataFormatDefinition { public void setProvider(String provider) { this.provider = provider; } + +public String getSignatureVerificationOption() { +return signatureVerificationOption; +} + +public void setSignatureVerificationOption(String signatureVerificationOption) { +this.signatureVerificationOption = signatureVerificationOption; +} } \ No newline at end of file
camel git commit: Adding another PGP DataFormat configuration option
Repository: camel Updated Branches: refs/heads/camel-2.14.x 97f92e59e - abaaa9e3e Adding another PGP DataFormat configuration option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/abaaa9e3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/abaaa9e3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/abaaa9e3 Branch: refs/heads/camel-2.14.x Commit: abaaa9e3ea8856f56fb0db8ec2d4dc31054b2910 Parents: 97f92e5 Author: Colm O hEigeartaigh cohei...@apache.org Authored: Fri Jan 9 12:06:42 2015 + Committer: Colm O hEigeartaigh cohei...@apache.org Committed: Fri Jan 9 12:29:16 2015 + -- .../apache/camel/model/dataformat/PGPDataFormat.java | 13 + 1 file changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/abaaa9e3/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java index b65f1f1..a4accbd 100644 --- a/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java +++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java @@ -56,6 +56,8 @@ public class PGPDataFormat extends DataFormatDefinition { private Integer compressionAlgorithm; @XmlAttribute private Integer hashAlgorithm; +@XmlAttribute +private String signatureVerificationOption; public PGPDataFormat() { super(pgp); @@ -99,6 +101,9 @@ public class PGPDataFormat extends DataFormatDefinition { if (hashAlgorithm != null) { setProperty(camelContext, dataFormat, hashAlgorithm, hashAlgorithm); } +if (signatureVerificationOption != null) { +setProperty(camelContext, dataFormat, signatureVerificationOption, signatureVerificationOption); +} } public String getSignatureKeyUserid() { @@ -196,4 +201,12 @@ public class PGPDataFormat extends DataFormatDefinition { public void setProvider(String provider) { this.provider = provider; } + +public String getSignatureVerificationOption() { +return signatureVerificationOption; +} + +public void setSignatureVerificationOption(String signatureVerificationOption) { +this.signatureVerificationOption = signatureVerificationOption; +} } \ No newline at end of file
svn commit: r935593 - in /websites/production/camel/content: cache/main.pageCache camel-2150-release.html
Author: buildbot Date: Fri Jan 9 13:20:58 2015 New Revision: 935593 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2150-release.html == --- websites/production/camel/content/camel-2150-release.html (original) +++ websites/production/camel/content/camel-2150-release.html Fri Jan 9 13:20:58 2015 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.15.0Release-Camel2.15.0release(currentlyinprogress)Camel#160;2.15.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=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;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.15.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.15.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pullispanComponent documentation now included in the built component JARs. And Java API and JMX API to access that documentation. And APIs to explain an endpoint uri and what all those configured options mean.#160;/span/lilispanComponent can now have#160;associated#160;label(s) which are use d for grouping components into: core, database, messaging, http, rest, etc./span/lilispanProvide Configurer for user to configure the CXF conduit and CXF destination from Java code/span/lilispanspanAdded a codeDelegateEndpoint/code#160;interface into Camel API/span/span/liliSupport to setup the SslContextParameters in the a shape=rect href=restlet.htmlcamel-restlet/a component/liliJava DSL - Should support nested choice in doTry .. doCatch/lilia shape=rect href=mongodb.htmlMongoDb/a component now a shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7996;stores OIDs/a#160;of the inserted records in the message header/lilia shape=rect href=recipient-list.htmlRecipient List/a now supports specifying custom#160;a shape=rect href=exchange-pattern.htmlExchange Pattern/a in the endpoint ur's/lilia shape=rect href=type-converter.htmlType Converter/a to enum's is now case insensitive, so you can convert safely level=info to an enum with name Level.INFO etc./lilia shape=rect href=xslt.htmlXSLT/a and#160;a shape=rect href=https://cwiki.apache.org/confluence/display/SM/Validation;Validation/a components now provides all their endpoint configurations in the endpoint, and not only in the component, making these components like any other components./liliMade the a shape=rect href=karaf.htmlCamel Karaf Commands/a reusable by moving common code into a#160;codecamel-commands-core/code module that SPI can extend and plugin Camel commands for other environments./liliFurther hardening of the#160;a shape=rect href=sjms.htmlSJMS/a#160;component./lilia shape=rect href=rest-dsl.htmlRest DSL/a with embedded routes now supports a shape=rect href=exception-clause.htmlonException/a, a shape=rect href=intercept.htmlintercept/a etc in use for those embedded routes, just like any regular r outes.#160;/lilia shape=rect href=rest-dsl.htmlRest DSL/a now by default uses custom error message as-is without attempting to binding output (requires a HTTP error code of 300+ is set as a header)/liliCamel#160;a shape=rect href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now supports specifying a default value together with the key to lookup./liliCamel#160;a shape=rect href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now supports not having to define a PropertiesComponent if all the placeholder keys has default values which are to be used (less configuration needed in those situations)./liliCamel#160;a shape=rect href=using-propertyplaceholder.htmlUsing PropertyPlaceholder/a now supports 3rd party functions to lookup the property values, this allow end users to implement their own logic - we provide 3 out of the box functions to lookup values from OS environment variable, JVM system properties, or the service name idiom./lilia shape=rect href=rabbitmq.htmlRabbitMQ/a now pools Channels for the producer to avoid sharing same Channel among concurrent producers which are not recommended by RabbitMQ client./liliCamel commands is now reusable outside Apache Karaf as a base by the#160;codecommands-core/code module./liliCamel commands using a shape=rect class=external-link href=http://www.jolokia.org/;
[4/5] camel git commit: CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges
CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f812a45e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f812a45e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f812a45e Branch: refs/heads/master Commit: f812a45e16cf72ccd2feb7827b72427909fdaf56 Parents: 416654d Author: Claus Ibsen davscl...@apache.org Authored: Fri Jan 9 12:50:25 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 13:41:46 2015 +0100 -- .../camel/impl/DefaultInflightRepository.java | 8 + .../apache/camel/spi/InflightRepository.java| 2 +- .../camel/commands/AbstractCamelCommand.java| 8 + .../commands/AbstractLocalCamelController.java | 53 +++ .../apache/camel/commands/CamelController.java | 11 ++ .../camel/commands/ContextInflightCommand.java | 150 +++ .../camel/commands/ContextInfoCommand.java | 8 - .../jolokia/DefaultJolokiaCamelController.java | 33 .../karaf/commands/CamelCommandSupport.java | 8 - .../camel/karaf/commands/ContextInflight.java | 43 ++ .../OSGI-INF/blueprint/camel-commands.xml | 9 ++ 11 files changed, 316 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f812a45e/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java index 5abe8e8..ab0079b 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java @@ -106,6 +106,14 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh return Long.compare(d1, d2); } }); +} else { +// else sort by exchange id +Collections.sort(values, new ComparatorExchange() { +@Override +public int compare(Exchange e1, Exchange e2) { +return e1.getExchangeId().compareTo(e2.getExchangeId()); +} +}); } for (Exchange exchange : values) { http://git-wip-us.apache.org/repos/asf/camel/blob/f812a45e/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java -- diff --git a/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java b/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java index 0fc313f..f7aad78 100644 --- a/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java +++ b/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java @@ -140,7 +140,7 @@ public interface InflightRepository extends StaticService { * * @param limit maximum number of entries to return * @param sortByLongestDuration to sort by the longest duration. Set to tttrue/tt to include the exchanges that has been inflight the longest time, - * set to ttfalse/tt to include the exchanges in unspecified order. + * set to ttfalse/tt to sort by exchange id */ CollectionInflightExchange browse(int limit, boolean sortByLongestDuration); http://git-wip-us.apache.org/repos/asf/camel/blob/f812a45e/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractCamelCommand.java -- diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractCamelCommand.java b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractCamelCommand.java index 03fa4e3..55035b8 100644 --- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractCamelCommand.java +++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractCamelCommand.java @@ -31,4 +31,12 @@ public abstract class AbstractCamelCommand implements CamelCommand { } } +public String safeNull(Object s) { +if (ObjectHelper.isEmpty(s)) { +return ; +} else { +return s.toString(); +} +} + } http://git-wip-us.apache.org/repos/asf/camel/blob/f812a45e/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java -- diff --git
[5/5] camel git commit: CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges
CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/996e32c9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/996e32c9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/996e32c9 Branch: refs/heads/master Commit: 996e32c9962faf5d123dd0662f09f914806f8ecd Parents: 3b94318 Author: Claus Ibsen davscl...@apache.org Authored: Fri Jan 9 10:18:33 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 13:41:46 2015 +0100 -- .../management/mbean/CamelOpenMBeanTypes.java | 11 +++ .../mbean/ManagedInflightRepositoryMBean.java | 35 .../DefaultManagementLifecycleStrategy.java | 4 + .../mbean/ManagedInflightRepository.java| 84 .../ManagedInflightRepositoryTest.java | 75 + 5 files changed, 209 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/996e32c9/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java -- diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java index 5d1fa41..2654a6c 100644 --- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java @@ -121,4 +121,15 @@ public final class CamelOpenMBeanTypes { new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING}); } +public static TabularType listInflightExchangesTabularType() throws OpenDataException { +CompositeType ct = listInflightExchangesCompositeType(); +return new TabularType(listInflightExchanges, Lists inflight exchanges, ct, new String[]{exchangeId}); +} + +public static CompositeType listInflightExchangesCompositeType() throws OpenDataException { +return new CompositeType(exchanges, Exchanges, new String[]{exchangeId, routeId, nodeId, duration, elapsed}, +new String[]{Exchange Id, RouteId, NodeId, Duration, Elapsed}, +new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING}); +} + } http://git-wip-us.apache.org/repos/asf/camel/blob/996e32c9/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java -- diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java new file mode 100644 index 000..1b42758 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.api.management.mbean; + +import javax.management.openmbean.TabularData; + +import org.apache.camel.api.management.ManagedAttribute; +import org.apache.camel.api.management.ManagedOperation; + +public interface ManagedInflightRepositoryMBean extends ManagedServiceMBean { + +@ManagedAttribute(description = Current size of inflight exchanges.) +int getSize(); + +@ManagedOperation(description = Current size of inflight exchanges which are from the given route.) +int size(String routeId); + +@ManagedOperation(description = Lists all the exchanges which are currently inflight) +TabularData browse(); + +} http://git-wip-us.apache.org/repos/asf/camel/blob/996e32c9/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java -- diff --git
[3/5] camel git commit: CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges
CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3b943187 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3b943187 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3b943187 Branch: refs/heads/master Commit: 3b94318773a9ed9705e1a9819273bb65c068649c Parents: 4ec817a Author: Claus Ibsen davscl...@apache.org Authored: Fri Jan 9 09:53:39 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 13:41:46 2015 +0100 -- .../camel/impl/DefaultInflightRepository.java | 110 +-- .../camel/impl/TimeoutInflightRepository.java | 11 +- .../apache/camel/spi/InflightRepository.java| 43 .../impl/InflightRepositoryBrowseTest.java | 66 +++ 4 files changed, 222 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3b943187/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java index 4408fde..f992042 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java @@ -16,34 +16,40 @@ */ package org.apache.camel.impl; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; +import org.apache.camel.MessageHistory; import org.apache.camel.spi.InflightRepository; import org.apache.camel.support.ServiceSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Default implement which just uses a counter + * Default {@link org.apache.camel.spi.InflightRepository}. * * @version */ -public class DefaultInflightRepository extends ServiceSupport implements InflightRepository { +public class DefaultInflightRepository extends ServiceSupport implements InflightRepository { private static final Logger LOG = LoggerFactory.getLogger(DefaultInflightRepository.class); -private final AtomicInteger totalCount = new AtomicInteger(); +private final ConcurrentMapString, Exchange inflight = new ConcurrentHashMapString, Exchange(); private final ConcurrentMapString, AtomicInteger routeCount = new ConcurrentHashMapString, AtomicInteger(); public void add(Exchange exchange) { -totalCount.incrementAndGet(); +inflight.put(exchange.getExchangeId(), exchange); } public void remove(Exchange exchange) { -totalCount.decrementAndGet(); +inflight.remove(exchange.getExchangeId()); } public void add(Exchange exchange, String routeId) { @@ -61,7 +67,7 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh } public int size() { -return totalCount.get(); +return inflight.size(); } @Deprecated @@ -77,7 +83,16 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh @Override public int size(String routeId) { AtomicInteger existing = routeCount.get(routeId); -return existing != null ? existing.get() : 0; +return existing != null ? existing.get() : 0; +} + +@Override +public CollectionInflightExchange browse() { +ListInflightExchange answer = new ArrayListInflightExchange(); +for (Exchange exchange : inflight.values()) { +answer.add(new InflightExchangeEntry(exchange)); +} +return Collections.unmodifiableCollection(answer); } @Override @@ -94,4 +109,85 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh } routeCount.clear(); } + +private static final class InflightExchangeEntry implements InflightExchange { + +private final Exchange exchange; + +private InflightExchangeEntry(Exchange exchange) { +this.exchange = exchange; +} + +@Override +public Exchange getExchange() { +return exchange; +} + +@Override +public long getDuration() { +long duration = 0; +Date created = exchange.getProperty(Exchange.CREATED_TIMESTAMP, Date.class); +if (created != null) { +duration = System.currentTimeMillis() -
[1/5] camel git commit: CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges
Repository: camel Updated Branches: refs/heads/master 4ec817aa7 - 22d596737 CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/22d59673 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/22d59673 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/22d59673 Branch: refs/heads/master Commit: 22d5967376969396efeea411c6a6cf26a2eb7948 Parents: f812a45 Author: Claus Ibsen davscl...@apache.org Authored: Fri Jan 9 13:00:48 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 13:41:46 2015 +0100 -- .../jolokia/DefaultJolokiaCamelController.java | 25 ++-- .../commands/jolokia/JolokiaRemoteTest.java | 9 +++ 2 files changed, 22 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/22d59673/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java -- diff --git a/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java b/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java index 0a44998..1ef0920 100644 --- a/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java +++ b/platforms/commands/commands-jolokia/src/main/java/org/apache/camel/commands/jolokia/DefaultJolokiaCamelController.java @@ -235,22 +235,23 @@ public class DefaultJolokiaCamelController extends AbstractCamelController imple ObjectName found = lookupCamelContext(camelContextName); if (found != null) { -String pattern = String.format(%s:context=%s,type=services,name=\%s\, found.getDomain(), found.getKeyProperty(context), DefaultInflightRepository); +String pattern = String.format(%s:context=%s,type=services,name=DefaultInflightRepository, found.getDomain(), found.getKeyProperty(context)); ObjectName on = ObjectName.getInstance(pattern); J4pExecResponse er = jolokia.execute(new J4pExecRequest(on, browse(int,boolean), limit, sortByLongestDuration)); if (er != null) { JSONObject data = er.getValue(); -for (Object obj : data.values()) { -JSONObject data2 = (JSONObject) obj; -JSONObject inflight = (JSONObject) data2.values().iterator().next(); - -MapString, Object row = new LinkedHashMapString, Object(); -row.put(exchangeId, asString(inflight.get(exchangeId))); -row.put(routeId, asString(inflight.get(routeIdId))); -row.put(nodeId, asString(inflight.get(nodeId))); -row.put(duration, asString(inflight.get(duration))); -row.put(elapsed, asString(inflight.get(elapsed))); -answer.add(row); +if (data != null) { +for (Object obj : data.values()) { +JSONObject inflight = (JSONObject) obj; + +MapString, Object row = new LinkedHashMapString, Object(); +row.put(exchangeId, asString(inflight.get(exchangeId))); +row.put(routeId, asString(inflight.get(routeId))); +row.put(nodeId, asString(inflight.get(nodeId))); +row.put(duration, asString(inflight.get(duration))); +row.put(elapsed, asString(inflight.get(elapsed))); +answer.add(row); +} } } } http://git-wip-us.apache.org/repos/asf/camel/blob/22d59673/platforms/commands/commands-jolokia/src/test/java/org/apache/camel/commands/jolokia/JolokiaRemoteTest.java -- diff --git a/platforms/commands/commands-jolokia/src/test/java/org/apache/camel/commands/jolokia/JolokiaRemoteTest.java b/platforms/commands/commands-jolokia/src/test/java/org/apache/camel/commands/jolokia/JolokiaRemoteTest.java index 95e1c7f..758b823 100644 --- a/platforms/commands/commands-jolokia/src/test/java/org/apache/camel/commands/jolokia/JolokiaRemoteTest.java +++ b/platforms/commands/commands-jolokia/src/test/java/org/apache/camel/commands/jolokia/JolokiaRemoteTest.java @@ -204,4 +204,13 @@ public class JolokiaRemoteTest { System.out.println(data); } +@Test +public void testInflight() throws Exception { +controller = new DefaultJolokiaCamelController(); +
[2/5] camel git commit: CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges
CAMEL-8223: Inflight repository to allow browsing of current inflight exchanges Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/416654d0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/416654d0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/416654d0 Branch: refs/heads/master Commit: 416654d0e8200f8f00663289db758e9cafcd7397 Parents: 996e32c Author: Claus Ibsen davscl...@apache.org Authored: Fri Jan 9 11:05:29 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Fri Jan 9 13:41:46 2015 +0100 -- .../mbean/ManagedInflightRepositoryMBean.java | 3 ++ .../camel/impl/DefaultInflightRepository.java | 40 .../camel/impl/TimeoutInflightRepository.java | 13 +++ .../mbean/ManagedInflightRepository.java| 9 - .../apache/camel/spi/InflightRepository.java| 9 + 5 files changed, 57 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/416654d0/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java -- diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java index 1b42758..0f74996 100644 --- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedInflightRepositoryMBean.java @@ -32,4 +32,7 @@ public interface ManagedInflightRepositoryMBean extends ManagedServiceMBean { @ManagedOperation(description = Lists all the exchanges which are currently inflight) TabularData browse(); +@ManagedOperation(description = Lists all the exchanges which are currently inflight, limited and sorted) +TabularData browse(int limit, boolean sortByLongestDuration); + } http://git-wip-us.apache.org/repos/asf/camel/blob/416654d0/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java index f992042..5abe8e8 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java @@ -19,6 +19,7 @@ package org.apache.camel.impl; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.List; import java.util.concurrent.ConcurrentHashMap; @@ -88,9 +89,30 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh @Override public CollectionInflightExchange browse() { +return browse(-1, false); +} + +@Override +public CollectionInflightExchange browse(int limit, boolean sortByLongestDuration) { ListInflightExchange answer = new ArrayListInflightExchange(); -for (Exchange exchange : inflight.values()) { + +ListExchange values = new ArrayListExchange(inflight.values()); +if (sortByLongestDuration) { +Collections.sort(values, new ComparatorExchange() { +@Override +public int compare(Exchange e1, Exchange e2) { +long d1 = getExchangeDuration(e1); +long d2 = getExchangeDuration(e2); +return Long.compare(d1, d2); +} +}); +} + +for (Exchange exchange : values) { answer.add(new InflightExchangeEntry(exchange)); +if (limit 0 answer.size() = limit) { +break; +} } return Collections.unmodifiableCollection(answer); } @@ -110,6 +132,15 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh routeCount.clear(); } +private static long getExchangeDuration(Exchange exchange) { +long duration = 0; +Date created = exchange.getProperty(Exchange.CREATED_TIMESTAMP, Date.class); +if (created != null) { +duration = System.currentTimeMillis() - created.getTime(); +} +return duration; +} + private static final class InflightExchangeEntry implements InflightExchange { private final Exchange exchange; @@ -125,12 +156,7 @@ public class DefaultInflightRepository extends ServiceSupport implements Infligh @Override public long
svn commit: r935586 [1/3] - in /websites/production/camel/content: book-component-appendix.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html hl7.html
Author: buildbot Date: Fri Jan 9 11:23:32 2015 New Revision: 935586 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-dataformat-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/crypto.html websites/production/camel/content/hl7.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 Fri Jan 9 11:23:32 2015 @@ -1360,11 +1360,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1420798748751 {padding: 0px;} -div.rbtoc1420798748751 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1420798748751 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1420802278226 {padding: 0px;} +div.rbtoc1420802278226 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1420802278226 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1420798748751 +/*]]*//style/pdiv class=toc-macro rbtoc1420802278226 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -4862,7 +4862,7 @@ hibernate:[entityClassName][?options] lt;!-- use the same version as your Camel core version --gt; lt;/dependencygt; ]]/script -/div/divh3 id=BookComponentAppendix-HL7MLLPprotocolHL7 MLLP protocol/h3pHL7 is often used with the HL7 MLLP protocol, which is a text based TCP socket based protocol. This component ships with a Mina and Netty4 Codec that conforms to the MLLP protocol so you can easily expose an HL7 listener accepting HL7 requests over the TCP transport layer. To expose a HL7 listener service, the a shape=rect href=mina2.htmlcamel-mina2/a#160;or a shape=rect href=netty4.htmlcamel-netty4/a component is used with the codeHL7MLLPCodec/code#160;(mina2) or codeHL7MLLPNettyDecoder/HL7MLLPNettyEncoder/code (Netty4)./ppHL7 MLLP codec can be configured as follows:/pdiv class=confluenceTableSmalldiv class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThpName/p/thth colspan=1 rowspan=1 class=confluenceThpDefault Value/p/thth colspan=1 rowspan=1 class=confluenceThpDescription/p /th/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodestartByte/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcode0x0b/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe start byte spanning the HL7 payload./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodeendByte1/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcode0x1c/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe first end byte spanning the HL7 payload./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodeendByte2/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcode0x0d/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe 2nd end byte spanning the HL7 payload./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodecharset/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpJVM Default/p/tdtd colspan= 1 rowspan=1 class=confluenceTdpThe encoding (a a shape=rect class=external-link href=http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html; rel=nofollowcharset name/a) to use for the codec. If not provided, Camel will use the a shape=rect class=external-link href=http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#defaultCharset() rel=nofollowJVM default Charset/a./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdcodeproduceString/code/tdtd colspan=1 rowspan=1 class=confluenceTdcodetrue/code/tdtd colspan=1 rowspan=1 class=confluenceTdstrong(Camel 2.14.1)/strong If true, the codec creates a string using the defined charset. If false, the codec sends a plain byte array into the route, so that the HL7 Data Format can determine the actual charset from the HL7 message content./td/trtrtd colspan=1 rowspan=1 class=confluenceTdcodeconvertLFtoCR/code/tdtd colspan=1 rowspan=1 class=confluenceTdcodefalse/code/tdtd colspan=1 rowspan=1 class=confluenceTdWill convert code\n/code to code\r/code (code0x0d/code, 13 decimal) as HL7 stipulates code\r/code as segment terminators. The HAPI library requires the use of code\r/code./td/tr/tbody/table/div/divh4
svn commit: r935586 [2/3] - in /websites/production/camel/content: book-component-appendix.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html hl7.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 Fri Jan 9 11:23:32 2015 @@ -4126,11 +4126,11 @@ While not actual tutorials you might fin /div /div h2 id=BookInOnePage-PrefacePreface/h2pThis 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 a shape=rect class=external-link href=http://www.springramework.org; rel=nofollowSpring/a service. The route works in a synchronous fashion returning a response to the client./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1420798789231 {padding: 0px;} -div.rbtoc1420798789231 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1420798789231 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1420802372656 {padding: 0px;} +div.rbtoc1420802372656 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1420802372656 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1420798789231 +/*]]*//style/pdiv class=toc-macro rbtoc1420802372656 ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMSTutorial on Spring Remoting with JMS/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrefacePreface/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrerequisitesPrerequisites/a/lilia shape=rect href=#Tutorial-JmsRemoting-DistributionDistribution/a/lilia shape=rect href=#Tutorial-JmsRemoting-AboutAbout/a/lilia shape=rect href=#Tutorial-JmsRemoting-CreatetheCamelProjectCreate the Camel Project/a ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-UpdatethePOMwithDependenciesUpdate the POM with Dependencies/a/li/ul /lilia shape=rect href=#Tutorial-JmsRemoting-WritingtheServerWriting the Server/a @@ -6316,11 +6316,11 @@ So we completed the last piece in the pi style type=text/css/*![CDATA[*/ -div.rbtoc1420798791397 {padding: 0px;} -div.rbtoc1420798791397 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1420798791397 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1420802377586 {padding: 0px;} +div.rbtoc1420802377586 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1420802377586 li {margin-left: 0px;padding-left: 0px;} -/*]]*//stylediv class=toc-macro rbtoc1420798791397 +/*]]*//stylediv class=toc-macro rbtoc1420802377586 ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamelTutorial using Axis 1.4 with Apache Camel/a ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-PrerequisitesPrerequisites/a/lilia shape=rect href=#Tutorial-AXIS-Camel-DistributionDistribution/a/lilia shape=rect href=#Tutorial-AXIS-Camel-IntroductionIntroduction/a/lilia shape=rect href=#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxisSetting up the project to run Axis/a ul class=toc-indentationlia shape=rect href=#Tutorial-AXIS-Camel-Maven2Maven 2/a/lilia shape=rect href=#Tutorial-AXIS-Camel-wsdlwsdl/a/lilia shape=rect href=#Tutorial-AXIS-Camel-ConfiguringAxisConfiguring Axis/a/lilia shape=rect href=#Tutorial-AXIS-Camel-RunningtheExampleRunning the Example/a/li/ul @@ -12675,7 +12675,7 @@ from(quot;direct:key-in-header-decrypt script class=theme: Default; brush: xml; gutter: false type=syntaxhighlighter![CDATA[ lt;crypto id=quot;nokeyquot; algorithm=quot;DESquot; /gt; ]]/script -/div/divh3 id=BookInOnePage-PGPDataFormatOptionsPGPDataFormat Options/h3div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThpName/p/thth colspan=1 rowspan=1 class=confluenceThpType/p/thth colspan=1 rowspan=1 class=confluenceThpDefault/p/thth colspan=1 rowspan=1 class=confluenceThpDescription/p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodekeyUserid/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeString/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe user ID of the key in the PGP keyring used during encryption. See also option codekeyUserids/code. Can also be only a part of a user ID. For example, if the user ID is Test User lt;t...@camel.comgt; then you can use the part Test User or lt;t...@camel.comgt; to address the user ID./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodekeyUserids/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeListlt;Stringgt;/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpstrongSince camel 2.12.2/strong: PGP allows to encrypt the symmetric key by several asymmetric public receiver keys. You can specify here the User IDs or parts of User IDs of several public keys contained in the PGP keyring. If you just have one User ID, then you can also use the option codekeyUserid/code.
svn commit: r935586 [3/3] - in /websites/production/camel/content: book-component-appendix.html book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html hl7.html
Modified: websites/production/camel/content/crypto.html == --- websites/production/camel/content/crypto.html (original) +++ websites/production/camel/content/crypto.html Fri Jan 9 11:23:32 2015 @@ -230,7 +230,7 @@ from(quot;direct:key-in-header-decrypt script class=theme: Default; brush: xml; gutter: false type=syntaxhighlighter![CDATA[ lt;crypto id=quot;nokeyquot; algorithm=quot;DESquot; /gt; ]]/script -/div/divh3 id=Crypto-PGPDataFormatOptionsPGPDataFormat Options/h3div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThpName/p/thth colspan=1 rowspan=1 class=confluenceThpType/p/thth colspan=1 rowspan=1 class=confluenceThpDefault/p/thth colspan=1 rowspan=1 class=confluenceThpDescription/p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodekeyUserid/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeString/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpThe user ID of the key in the PGP keyring used during encryption. See also option codekeyUserids/code. Can also be only a part of a user ID. For example, if the user ID is Test User lt;t...@camel.comgt; then you can use the part Test User or lt;t...@camel.comgt; to addr ess the user ID./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodekeyUserids/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeListlt;Stringgt;/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpstrongSince camel 2.12.2/strong: PGP allows to encrypt the symmetric key by several asymmetric public receiver keys. You can specify here the User IDs or parts of User IDs of several public keys contained in the PGP keyring. If you just have one User ID, then you can also use the option codekeyUserid/code. The User ID specified in codekeyUserid/code and the User IDs in codekeyUserids/code will be merged together and the corresponding public keys will be used for the encryption./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodepassword/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeS tring/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpPassword used when opening the private key (not used for encryption)./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodekeyFileName/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeString/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpFilename of the keyring; must be accessible as a classpath resource (but you can specify a location in the file system by using the file: prefix)./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodeencryptionKeyRing/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodebyte[]/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTd pstrongSince camel 2.12.1/strong; encryption keyring; you can not set the keyFileName and encryptionKeyRing at the same time./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesignatureKeyUserid/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeString/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpstrongSince Camel 2.11.0/strong; optional User ID of the key in the PGP keyring used for signing (during encryption) or signature verification (during decryption). During the signature verification process the specified User ID restricts the public keys from the public keyring which can be used for the verification. If no User ID is specified for the signature verficiation then any public key in the public keyring can be used for the verification. Can also be only a part of a user ID. For example, if the user ID is Test User lt;test@c amel.comgt; then you can use the part Test User or lt;t...@camel.comgt; to address the User ID./p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdpcodesignatureKeyUserids/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodeListlt;Stringgt;/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpcodenull/code/p/tdtd colspan=1 rowspan=1 class=confluenceTdpstrongSince Camel 2.12.3/strong; optional list of User IDs of the key in the PGP keyring used for signing (during encryption) or signature verification (during decryption). You can specify here the User IDs or parts of User IDs of several keys contained in the PGP keyring. If you just have one User ID, then you can also use the option codekeyUserid/code. The User ID specified in codekeyUserid/code and the User IDs in codekeyUserids/code will be merged together and the corresponding keys will be used for the signing or signature verificatio n. If the specified User IDs reference several keys then for each key a signature is added to