[1/2] git commit: Added @UriParams for camel-twitter
Updated Branches: refs/heads/camel-2.12.x bbd3d8d4f -> 0d456ee76 refs/heads/master b26b6a429 -> 4b233f973 Added @UriParams for camel-twitter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4b233f97 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4b233f97 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4b233f97 Branch: refs/heads/master Commit: 4b233f973bb569195bd79857cc5db449fb088df1 Parents: b26b6a4 Author: Claus Ibsen Authored: Sat Feb 8 11:37:47 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 11:37:47 2014 +0100 -- .../org/apache/camel/component/twitter/TwitterComponent.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4b233f97/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java index 1a6ca9b..673ccd0 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java @@ -20,18 +20,22 @@ import java.util.Map; import org.apache.camel.Endpoint; import org.apache.camel.component.twitter.data.EndpointType; -import org.apache.camel.impl.DefaultComponent; +import org.apache.camel.impl.UriEndpointComponent; /** * Twitter component */ -public class TwitterComponent extends DefaultComponent { +public class TwitterComponent extends UriEndpointComponent { private String consumerKey; private String consumerSecret; private String accessToken; private String accessTokenSecret; +public TwitterComponent() { +super(TwitterEndpoint.class); +} + protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { TwitterConfiguration properties = new TwitterConfiguration();
[2/2] git commit: Added @UriParams for camel-twitter
Added @UriParams for camel-twitter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0d456ee7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0d456ee7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0d456ee7 Branch: refs/heads/camel-2.12.x Commit: 0d456ee764f5a619bdb01090d74b15790dce74fa Parents: bbd3d8d Author: Claus Ibsen Authored: Sat Feb 8 11:37:47 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 11:38:10 2014 +0100 -- .../org/apache/camel/component/twitter/TwitterComponent.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0d456ee7/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java index 1a6ca9b..673ccd0 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java @@ -20,18 +20,22 @@ import java.util.Map; import org.apache.camel.Endpoint; import org.apache.camel.component.twitter.data.EndpointType; -import org.apache.camel.impl.DefaultComponent; +import org.apache.camel.impl.UriEndpointComponent; /** * Twitter component */ -public class TwitterComponent extends DefaultComponent { +public class TwitterComponent extends UriEndpointComponent { private String consumerKey; private String consumerSecret; private String accessToken; private String accessTokenSecret; +public TwitterComponent() { +super(TwitterEndpoint.class); +} + protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { TwitterConfiguration properties = new TwitterConfiguration();
svn commit: r896870 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html
Author: buildbot Date: Sat Feb 8 10:19:34 2014 New Revision: 896870 Log: Production update by buildbot for camel Modified: 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 Modified: websites/production/camel/content/book-dataformat-appendix.html == --- websites/production/camel/content/book-dataformat-appendix.html (original) +++ websites/production/camel/content/book-dataformat-appendix.html Sat Feb 8 10:19:34 2014 @@ -3675,7 +3675,23 @@ from("direct:start") ... .unmarshal(pgpVerifyWithSpecificKeysAndDecrypt) ... ]]> -If the PGP content has several signatures the verification is successful as soon as one signature can be verified.If you do not want to restrict the signer identities for verification then do not specify the signature key User IDs. In this case all public keys in the public keyring are taken into account.DependenciesTo use the Crypto dataformat in your camel routes you need to add the following dependency to your pom. +If the PGP content has several signatures the verification is successful as soon as one signature can be verified.If you do not want to restrict the signer identities for verification then do not specify the signature key User IDs. In this case all public keys in the public keyring are taken into account.Several Signatures in One PGP Data FormatSince Camel 2.12.3.The PGP specification allows that one PGP data format can contain several signatures from different keys. Since Camel 2.13.3 it is possible to create such kind of PGP content via specifying signature User IDs which relate to several private keys in the secret keyring.Several Signatures + + DependenciesTo use the Crypto dataformat in your camel routes you need to add the following dependency to your pom. This 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 JMS
- Preface
- Prerequisites
- Distribution
- About
- Create the Camel P
[CONF] Apache Camel > Crypto
Franz Forsthofer edited the page: Crypto ... If the PGP content has several signatures the verification is successful as soon as one signature can be verified. If you do not want to restrict the signer identities for verification then do not specify the signature key User IDs. In this case all public keys in the public keyring are taken into account. Several Signatures in One PGP Data Format Since Camel 2.12.3. The PGP specification allows that one PGP data format can contain several signatures from different keys. Since Camel 2.13.3 it is possible to create such kind of PGP content via specifying signature User IDs which relate to several private keys in the secret keyring. Code Block title Several Signatures language java PGPDataFormat pgpSignAndEncryptSeveralSignerKeys = new PGPDataFormat(); pgpSignAndEncryptSeveralSignerKeys.setKeyUserid(keyUserid); // for encrypting, you can also use setKeyUserids if you want to encrypt with several keys pgpSignAndEncryptSeveralSignerKeys.setKeyFileName(keyfileName); pgpSignAndEncryptSeveralSignerKeys.setSignatureKeyFileName(signatgureKeyfileName); pgpSignAndEncryptSeveralSignerKeys.setSignaturePassword("sdude"); // here we assume that all private keys have the same password, if this is not the case then you can use setPassphraseAccessor List signerUserIds = new ArrayList(); signerUserIds.add("company old key"); signerUserIds.add("company new key"); pgpSignAndEncryptSeveralSignerKeys.setSignatureKeyUserids(signerUserIds); from("direct:start") ... .marshal(pgpSignAndEncryptSeveralSignerKeys) ...
svn commit: r896862 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html
Author: buildbot Date: Sat Feb 8 09:19:16 2014 New Revision: 896862 Log: Production update by buildbot for camel Modified: 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 Modified: websites/production/camel/content/book-dataformat-appendix.html == --- websites/production/camel/content/book-dataformat-appendix.html (original) +++ websites/production/camel/content/book-dataformat-appendix.html Sat Feb 8 09:19:16 2014 @@ -3659,7 +3659,23 @@ from("direct:start") .unmarshal(pgpVerifyAndDecrypt) // can decrypt/verify messages encrypted/signed by different private/public keys ... ]]> -The functionality is especially useful to support the key exchange. If you want to exchange the private key for decrypting you can accept for a period of time messages which are either encrypted with the old or new corresponding public key. Or if the sender wants to exchange his signer private key, you can accept for a period of time, the old or new signer key.Technical background: The PGP encrypted data contains a Key ID of the public key which was used to encrypt the data. This Key ID can be used to locate the private key in the secret keyring to decrypt the data. The same mechanism is also used to locate the public key for verifying a signature. Therefore you no longer must specify User IDs for the unmarshaling.DependenciesTo use the Crypto dataformat in your camel routes you need to add the following dependency to your pom. +The functionality is especially useful to support the key exchange. If you want to exchange the private key for decrypting you can accept for a period of time messages which are either encrypted with the old or new corresponding public key. Or if the sender wants to exchange his signer private key, you can accept for a period of time, the old or new signer key.Technical background: The PGP encrypted data contains a Key ID of the public key which was used to encrypt the data. This Key ID can be used to locate the private key in the secret keyring to decrypt the data. The same mechanism is also used to locate the public key for verifying a signature. Therefore you no longer must specify User IDs for the unmarshaling.Restricting the Signer Identities during PGP Signature VerificationSince Camel 2.12.3.If you verify a si gnature you not only want to verify the correctness of the signature but you also want check that the signature comes from a certain identity or a specific set of identities. Therefore it is possible to restrict the number of public keys from the public keyring which can be used for the verification of a signature. Signature User IDs + +If the PGP content has several signatures the verification is successful as soon as one signature can be verified.If you do not want to restrict the signer identities for verification then do not specify the signature key User IDs. In this case all public keys in the public keyring are taken into account.DependenciesTo use the Crypto dataformat in your camel routes you need to add the following dependency to your pom. This 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 [CONF] Apache Camel > CryptoFranz Forsthofer edited the page: Crypto ... The functionality is especially useful to support the key exchange. If you want to exchange the private key for decrypting you can accept for a period of time messages which are either encrypted with the old or new corresponding public key. Or if the sender wants to exchange his signer private key, you can accept for a period of time, the old or new signer key. Technical background: The PGP encrypted data contains a Key ID of the public key which was used to encrypt the data. This Key ID can be used to locate the private key in the secret keyring to decrypt the data. The same mechanism is also used to locate the public key for verifying a signature. Therefore you no longer must specify User IDs for the unmarshaling. Restricting the Signer Identities during PGP Signature Verification Since Camel 2.12.3. If you verify a signature you not only want to verify the correctness of the signature but you also want check that the signature comes from a certain identity or a specific set of identities. Therefore it is possible to restrict the number of public keys from the public keyring which can be used for the verification of a signature. Code Block title Signature User IDs language java // specify the User IDs of the expected signer identities List expectedSigUserIds = new ArrayList(); expectedSigUserIds.add("Trusted company1"); expectedSigUserIds.add("Trusted company2"); PGPDataFormat pgpVerifyWithSpecificKeysAndDecrypt = new PGPDataFormat(); pgpVerifyWithSpecificKeysAndDecrypt.setPassword("my password"); // for decrypting with private key pgpVerifyWithSpecificKeysAndDecrypt.setKeyFileName(keyfileName); pgpVerifyWithSpecificKeysAndDecrypt.setSignatureKeyFileName(signatgureKeyfileName); pgpVerify
git commit: CAMEL-7092: Cleanup
Updated Branches: refs/heads/master cbed0690f -> b26b6a429 CAMEL-7092: Cleanup Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b26b6a42 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b26b6a42 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b26b6a42 Branch: refs/heads/master Commit: b26b6a4294d4b36f7eabc9b5f44f5e11c184931f Parents: cbed069 Author: Claus Ibsen Authored: Sat Feb 8 09:25:22 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 09:25:22 2014 +0100 -- components/camel-kafka/pom.xml | 108 +- .../camel/component/kafka/KafkaComponent.java | 2 +- .../camel/component/kafka/KafkaConstants.java | 2 +- .../camel/component/kafka/KafkaConsumer.java| 9 +- .../camel/component/kafka/KafkaEndpoint.java| 11 +- .../camel/component/kafka/KafkaProducer.java| 10 +- .../src/main/resources/META-INF/LICENSE.txt | 203 +++ .../src/main/resources/META-INF/NOTICE.txt | 11 + .../services/org/apache/camel/component/kafka | 17 ++ .../component/kafka/KafkaComponentTest.java | 3 - .../camel/component/kafka/KafkaConsumerIT.java | 8 +- .../component/kafka/KafkaConsumerTest.java | 21 +- .../component/kafka/KafkaEndpointTest.java | 13 -- .../camel/component/kafka/KafkaProducerIT.java | 8 +- .../component/kafka/KafkaProducerTest.java | 3 - .../component/kafka/SimplePartitioner.java | 3 - .../src/test/resources/log4j.properties | 35 .../camel-kafka/src/test/resources/log4j.xml| 19 -- 18 files changed, 342 insertions(+), 144 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b26b6a42/components/camel-kafka/pom.xml -- diff --git a/components/camel-kafka/pom.xml b/components/camel-kafka/pom.xml index 0a443e4..b824254 100644 --- a/components/camel-kafka/pom.xml +++ b/components/camel-kafka/pom.xml @@ -17,62 +17,64 @@ --> http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> -4.0.0 + 4.0.0 - -org.apache.camel -components -2.13-SNAPSHOT - + +org.apache.camel +components +2.13-SNAPSHOT + -camel-kafka -bundle -Camel :: Kafka -Camel kafka support + camel-kafka + bundle + Camel :: Kafka + Camel Kafka support - - org.apache.camel.component.kafka.* - - org.apache.camel.spi.ComponentResolver;component=kafka, - - + + org.apache.camel.component.kafka.* + + org.apache.camel.spi.ComponentResolver;component=kafka, + + - - -org.apache.camel -camel-core - - -org.apache.kafka -kafka_2.10 -${kafka-version} - - -org.scala-lang -scala-library -${scala-version} -provided - - -org.apache.camel -camel-test -test - - -junit -junit -test - - -org.mockito -mockito-core -test - - -org.slf4j -slf4j-log4j12 -test - - + + + org.apache.camel + camel-core + + + org.apache.kafka + kafka_2.10 + ${kafka-version} + + + org.slf4j + slf4j-simple + + + + + org.scala-lang + scala-library + ${scala-version} + provided + + + + org.apache.camel + camel-test + test + + + org.mockito + mockito-core + test + + + org.slf4j + slf4j-log4j12 + test + + http://git-wip-us.apache.org/repos/asf/camel/blob/b26b6a42/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java -- diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java index d3d4679..845f060 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java @@ -22,7 +22,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.impl.DefaultComponent; /** - * @author Stephen Samuel + * */ public class KafkaComponent extends DefaultComponent
[CONF] Apache Camel > Crypto
Franz Forsthofer edited the page: Crypto ... Wiki Markup {div:class=confluenceTableSmall} || Name || Type || Default || Description || | {{keyUserid}} | {{String}} | {{null}} | The user ID of the key in the PGP keyring used during encryption. See also option {{keyUserids}}. Can also be only a part of a user ID. For example, if the user ID is "Test User " then you can use the part "Test User" or "" to address the user ID. | | {{keyUserids}} | {{List}} | {{null}} | *Since camel 2.12.2*: 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 {{keyUserid}}. The User ID specified in {{keyUserid}} and the User IDs in {{keyUserids}} will be merged together and the corresponding public keys will be used for the encryption. | | {{password}} | {{String}} | {{null}} | Password used when opening the private key (not used for encryption). | | {{keyFileName}} | {{String}} | {{null}} | Filename 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). | | {{encryptionKeyRing}} | {{byte\[\]}} | {{null}} | *Since camel 2.12.1*; encryption keyring; you can not set the keyFileName and encryptionKeyRing at the same time. | | {{signatureKeyUserid}} | {{String}} | {{null}} | *Since Camel 2.11.0*; 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 " then you can use the part "Test User" or "" to address the User ID. | | {{signatureKeyUserids}} | {{List}} | {{null}} | *Since Camel 2.12.3*; 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 {{keyUserid}}. The User ID specified in {{keyUserid}} and the User IDs in {{keyUserids}} will be merged together and the corresponding keys will be used for the signing or signature verification. If the specified User IDs reference several keys then for each key a signature is added to the PGP result during the encryption-signing process. In the decryption-verifying process the the list of User IDs restricts the list of public keys which can be used for signature verification. If the list of User IDs is empty then any public key in the public keyring can be used for the signature verification. | | {{signaturePassword}} | {{String}} | {{null}} | *Since Camel 2.11.0*; optional password used when opening the private key used for signing (during encryption). | | {{signatureKeyFileName}} | {{String}} | {{null}} | *Since Camel 2.11.0*; optional filename of the keyring to use for signing (during encryption) or for signature verification
[2/3] git commit: Added @UriParams for camel-twitter
Added @UriParams for camel-twitter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2fb8652a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2fb8652a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2fb8652a Branch: refs/heads/camel-2.12.x Commit: 2fb8652a9eaed1179e93a7b994111de4b58e3d5a Parents: 60011b9 Author: Claus Ibsen Authored: Sat Feb 8 08:23:40 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 09:07:37 2014 +0100 -- .../org/apache/camel/component/twitter/TwitterConfiguration.java | 2 ++ .../apache/camel/component/twitter/TwitterEndpointDirect.java| 4 .../org/apache/camel/component/twitter/TwitterEndpointEvent.java | 4 .../apache/camel/component/twitter/TwitterEndpointPolling.java | 4 4 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2fb8652a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java index 19e6b20..e693daa 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java @@ -21,6 +21,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriParams; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.TwitterStream; @@ -28,6 +29,7 @@ import twitter4j.TwitterStreamFactory; import twitter4j.conf.Configuration; import twitter4j.conf.ConfigurationBuilder; +@UriParams public class TwitterConfiguration { /** http://git-wip-us.apache.org/repos/asf/camel/blob/2fb8652a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java index 0e4d0c9..e1be501 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java @@ -54,6 +54,10 @@ public class TwitterEndpointDirect extends DirectEndpoint implements TwitterEndp return properties; } +public void setProperties(TwitterConfiguration properties) { +this.properties = properties; +} + @Override public EndpointType getEndpointType() { return EndpointType.DIRECT; http://git-wip-us.apache.org/repos/asf/camel/blob/2fb8652a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java index fb0fbc5..6d7d009 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java @@ -48,6 +48,10 @@ public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpo return properties; } +public void setProperties(TwitterConfiguration properties) { +this.properties = properties; +} + @Override public EndpointType getEndpointType() { return EndpointType.EVENT; http://git-wip-us.apache.org/repos/asf/camel/blob/2fb8652a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java index 5db48dd..7fec7b6 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java @@ -59,6 +59,10 @@ public class TwitterEndpointPolling extends
[1/3] git commit: CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs.
Updated Branches: refs/heads/camel-2.11.x 0e5304ca4 -> c8e8e92dc refs/heads/camel-2.12.x 60011b979 -> bbd3d8d4f CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c8e8e92d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c8e8e92d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c8e8e92d Branch: refs/heads/camel-2.11.x Commit: c8e8e92dca255743a9dce382501a3a846b680014 Parents: 0e5304c Author: Claus Ibsen Authored: Sat Feb 8 09:05:45 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 09:07:23 2014 +0100 -- .../apache/camel/guice/GuiceCamelContext.java | 28 ++-- 1 file changed, 20 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c8e8e92d/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java -- diff --git a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java index bb2bf59..7059f0f 100644 --- a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java +++ b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java @@ -29,7 +29,6 @@ import com.google.inject.Inject; import org.apache.camel.ErrorHandlerFactory; import org.apache.camel.RoutesBuilder; -import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConverter; import org.apache.camel.guice.impl.GuiceInjector; import org.apache.camel.guice.inject.Injectors; @@ -41,6 +40,7 @@ import org.apache.camel.spi.InterceptStrategy; import org.apache.camel.spi.LanguageResolver; import org.apache.camel.spi.LifecycleStrategy; import org.apache.camel.spi.Registry; +import org.apache.camel.util.ObjectHelper; /** * The default CamelContext implementation for working with Guice. @@ -60,20 +60,32 @@ public class GuiceCamelContext extends DefaultCamelContext { @PostConstruct @Override -public void start() throws Exception { -super.start(); +public void start() { +try { +super.start(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @PreDestroy @Override -public void stop() throws Exception { -super.stop(); +public void stop() { +try { +super.stop(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @Inject -public void setRouteBuilders(Set routeBuilders) throws Exception { +public void setRouteBuilders(Set routeBuilders) { for (RoutesBuilder builder : routeBuilders) { -addRoutes(builder); +try { +addRoutes(builder); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } } @@ -157,7 +169,7 @@ public class GuiceCamelContext extends DefaultCamelContext { return injector.getInstance(Context.class); } } catch (Exception e) { -throw new RuntimeCamelException(e); +throw ObjectHelper.wrapRuntimeCamelException(e); } }
[3/3] git commit: CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs.
CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bbd3d8d4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bbd3d8d4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bbd3d8d4 Branch: refs/heads/camel-2.12.x Commit: bbd3d8d4f098d56e50881f9a340b1be61c8e0911 Parents: 2fb8652 Author: Claus Ibsen Authored: Sat Feb 8 09:05:45 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 09:07:38 2014 +0100 -- .../apache/camel/guice/GuiceCamelContext.java | 28 ++-- 1 file changed, 20 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bbd3d8d4/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java -- diff --git a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java index bb2bf59..7059f0f 100644 --- a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java +++ b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java @@ -29,7 +29,6 @@ import com.google.inject.Inject; import org.apache.camel.ErrorHandlerFactory; import org.apache.camel.RoutesBuilder; -import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConverter; import org.apache.camel.guice.impl.GuiceInjector; import org.apache.camel.guice.inject.Injectors; @@ -41,6 +40,7 @@ import org.apache.camel.spi.InterceptStrategy; import org.apache.camel.spi.LanguageResolver; import org.apache.camel.spi.LifecycleStrategy; import org.apache.camel.spi.Registry; +import org.apache.camel.util.ObjectHelper; /** * The default CamelContext implementation for working with Guice. @@ -60,20 +60,32 @@ public class GuiceCamelContext extends DefaultCamelContext { @PostConstruct @Override -public void start() throws Exception { -super.start(); +public void start() { +try { +super.start(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @PreDestroy @Override -public void stop() throws Exception { -super.stop(); +public void stop() { +try { +super.stop(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @Inject -public void setRouteBuilders(Set routeBuilders) throws Exception { +public void setRouteBuilders(Set routeBuilders) { for (RoutesBuilder builder : routeBuilders) { -addRoutes(builder); +try { +addRoutes(builder); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } } @@ -157,7 +169,7 @@ public class GuiceCamelContext extends DefaultCamelContext { return injector.getInstance(Context.class); } } catch (Exception e) { -throw new RuntimeCamelException(e); +throw ObjectHelper.wrapRuntimeCamelException(e); } }
[1/2] git commit: Added @UriParams for camel-twitter
Updated Branches: refs/heads/master dd9f9df3d -> cbed0690f Added @UriParams for camel-twitter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9e47c921 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9e47c921 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9e47c921 Branch: refs/heads/master Commit: 9e47c9213b2913c6eeb755661e5e800294e16675 Parents: dd9f9df Author: Claus Ibsen Authored: Sat Feb 8 08:23:40 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 08:23:51 2014 +0100 -- .../org/apache/camel/component/twitter/TwitterConfiguration.java | 2 ++ .../apache/camel/component/twitter/TwitterEndpointDirect.java| 4 .../org/apache/camel/component/twitter/TwitterEndpointEvent.java | 4 .../apache/camel/component/twitter/TwitterEndpointPolling.java | 4 4 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9e47c921/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java index 19e6b20..e693daa 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterConfiguration.java @@ -21,6 +21,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriParams; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.TwitterStream; @@ -28,6 +29,7 @@ import twitter4j.TwitterStreamFactory; import twitter4j.conf.Configuration; import twitter4j.conf.ConfigurationBuilder; +@UriParams public class TwitterConfiguration { /** http://git-wip-us.apache.org/repos/asf/camel/blob/9e47c921/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java index 0e4d0c9..e1be501 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointDirect.java @@ -54,6 +54,10 @@ public class TwitterEndpointDirect extends DirectEndpoint implements TwitterEndp return properties; } +public void setProperties(TwitterConfiguration properties) { +this.properties = properties; +} + @Override public EndpointType getEndpointType() { return EndpointType.DIRECT; http://git-wip-us.apache.org/repos/asf/camel/blob/9e47c921/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java index fb0fbc5..6d7d009 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointEvent.java @@ -48,6 +48,10 @@ public class TwitterEndpointEvent extends DirectEndpoint implements TwitterEndpo return properties; } +public void setProperties(TwitterConfiguration properties) { +this.properties = properties; +} + @Override public EndpointType getEndpointType() { return EndpointType.EVENT; http://git-wip-us.apache.org/repos/asf/camel/blob/9e47c921/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java -- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java index 5db48dd..7fec7b6 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterEndpointPolling.java @@ -59,
[2/2] git commit: CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs.
CAMEL-7182: Do not throw checked exception in camel-guice as not allowed for pre/post constructs. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cbed0690 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cbed0690 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cbed0690 Branch: refs/heads/master Commit: cbed0690f906f912d6fa96fb4b70a25c4fd6e417 Parents: 9e47c92 Author: Claus Ibsen Authored: Sat Feb 8 09:05:45 2014 +0100 Committer: Claus Ibsen Committed: Sat Feb 8 09:05:45 2014 +0100 -- .../apache/camel/guice/GuiceCamelContext.java | 28 ++-- 1 file changed, 20 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/cbed0690/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java -- diff --git a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java index bb2bf59..7059f0f 100644 --- a/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java +++ b/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java @@ -29,7 +29,6 @@ import com.google.inject.Inject; import org.apache.camel.ErrorHandlerFactory; import org.apache.camel.RoutesBuilder; -import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConverter; import org.apache.camel.guice.impl.GuiceInjector; import org.apache.camel.guice.inject.Injectors; @@ -41,6 +40,7 @@ import org.apache.camel.spi.InterceptStrategy; import org.apache.camel.spi.LanguageResolver; import org.apache.camel.spi.LifecycleStrategy; import org.apache.camel.spi.Registry; +import org.apache.camel.util.ObjectHelper; /** * The default CamelContext implementation for working with Guice. @@ -60,20 +60,32 @@ public class GuiceCamelContext extends DefaultCamelContext { @PostConstruct @Override -public void start() throws Exception { -super.start(); +public void start() { +try { +super.start(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @PreDestroy @Override -public void stop() throws Exception { -super.stop(); +public void stop() { +try { +super.stop(); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } @Inject -public void setRouteBuilders(Set routeBuilders) throws Exception { +public void setRouteBuilders(Set routeBuilders) { for (RoutesBuilder builder : routeBuilders) { -addRoutes(builder); +try { +addRoutes(builder); +} catch (Exception e) { +throw ObjectHelper.wrapRuntimeCamelException(e); +} } } @@ -157,7 +169,7 @@ public class GuiceCamelContext extends DefaultCamelContext { return injector.getInstance(Context.class); } } catch (Exception e) { -throw new RuntimeCamelException(e); +throw ObjectHelper.wrapRuntimeCamelException(e); } }