svn commit: r1195338 - in /camel/branches/camel-2.8.x: ./ KEYS
Author: ningjiang Date: Mon Oct 31 05:46:20 2011 New Revision: 1195338 URL: http://svn.apache.org/viewvc?rev=1195338&view=rev Log: Merged revisions 1195317 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk r1195317 | ningjiang | 2011-10-31 11:02:22 +0800 (Mon, 31 Oct 2011) | 1 line Added public keys of Willem Modified: camel/branches/camel-2.8.x/ (props changed) camel/branches/camel-2.8.x/KEYS Propchange: camel/branches/camel-2.8.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Oct 31 05:46:20 2011 @@ -1 +1 @@ -/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,111,1189600,1189681,1189693,1189737,1190212-1190213,1190246,1190303 +/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,111,1189600,1189681,1189693,1189737,1190212-1190213,1190246,1190303,1195317 Propchange: camel/branches/camel-2.8.x/ -- Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.8.x/KEYS URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/KEYS?rev=1195338&r1=1195337&r2=1195338&view=diff == --- camel/branches/camel-2.8.x/KEYS (original) +++ camel/branches/camel-2.8.x/KEYS Mon Oct 31 05:46:20 2011 @@ -726,4 +726,91 @@ aXBFB9GtEAATQf2vS/UJw/PtInCQlF3Or3MmBPYR /Gq+wPWmBdjNBDyd5REj =aGvL -END PGP PUBLIC KEY BLOCK- +pub 1024D/AE8DE9E4 2008-02-26 + Key fingerprint = 2D6C 3C63 1196 B77D 12D8 C92F 2350 9298 AE8D E9E4 +uid Willem Jiang +sub 2048g/7103E49E 2008-02-26 +pub 4096R/14D0DEE9 2011-01-07 + Key fingerprint = 5000 847E C0EE 4523 38CE B801 F058 8A55 14D0 DEE9 +uid Willem Jiang (CODE SIGNING KEY) +sub 4096R/FE639F22 2011-01-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usGNmj +5K4mPCdsh+nqRNYberqRqwpTgr80SW1/w3NDH27/iZeSc2B3zlhYNhF/fGv9faHf +aVY9Tl9dohiFrg1YSd0NgP4dU9+yTshhVMX3cqQ9OmYd/V/VOdogXrM/Wl+51pdg +h9L1ZdwPMPqQF2IQUqn9H2au4YO3tHgcUFaglEU6A+o4/zFiIy4+tmiwZiUn3E0M +QgHbbrcEe7UHehlaqcB5YZkcqceLZb9151G2QxFFEYsILDX7r72+gIKza6uKL+Ba +reHQIkArRPJwv/ODstact0l8Ea9SGTfjmdZ/ABEBAAG0NldpbGxlbSBKaWFuZyAo +Q09ERSBTSUdOSU5HIEtFWSkgPG5pbmdqaWFuZ0BhcGFjaGUub3JnPokCNwQTAQIA +IQIbAwIeAQIXgAUCTSaQcwULCQgHAwUVCgkICwUWAgMBAAAKCRDwWIpVFNDe6e56 +D/99AHNEYoSNkHBT1dQhhusteMUnGVhb4XYmQNnMc5ugI5xpNV6Y1NKllW+gJFks +QERTGiNnfa0bWU0DD1QYdVY0eqZZzqSuKCx6T2QlFWzATHKuhqmU7pczFx4/EATl +yTuDtEFQ1PgV45dmhqwtnvsigB9jSRUOVFzHAo1tKUYQfgP7R8BXk8b3eLAaQ+38 +hMwWGGL3rvEAmcEdOIcg4Du6OnHkFf7w16Gd6MZqFu8263dog/LbEc7TIS09mPfg +06KADdqJcOtZJf068sNDLeQZ8TOnF+
svn commit: r1195317 - /camel/trunk/KEYS
Author: ningjiang Date: Mon Oct 31 03:02:22 2011 New Revision: 1195317 URL: http://svn.apache.org/viewvc?rev=1195317&view=rev Log: Added public keys of Willem Modified: camel/trunk/KEYS Modified: camel/trunk/KEYS URL: http://svn.apache.org/viewvc/camel/trunk/KEYS?rev=1195317&r1=1195316&r2=1195317&view=diff == --- camel/trunk/KEYS (original) +++ camel/trunk/KEYS Mon Oct 31 03:02:22 2011 @@ -726,4 +726,91 @@ aXBFB9GtEAATQf2vS/UJw/PtInCQlF3Or3MmBPYR /Gq+wPWmBdjNBDyd5REj =aGvL -END PGP PUBLIC KEY BLOCK- +pub 1024D/AE8DE9E4 2008-02-26 + Key fingerprint = 2D6C 3C63 1196 B77D 12D8 C92F 2350 9298 AE8D E9E4 +uid Willem Jiang +sub 2048g/7103E49E 2008-02-26 +pub 4096R/14D0DEE9 2011-01-07 + Key fingerprint = 5000 847E C0EE 4523 38CE B801 F058 8A55 14D0 DEE9 +uid Willem Jiang (CODE SIGNING KEY) +sub 4096R/FE639F22 2011-01-07 +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG/MacGPG2 v2.0.16 (Darwin) + +mQGiBEfDuDQRBADFJCCycB/7DfHD0SVBBa73sOiS4J8FI0EWH1U1nXULGAmacx45 +aBK8Vrp1hyAP4k15EU/x4a9Hn04RFS93FXsuFS1wamOREpOR4Wqeo0wZe764rYrn +MDzn+w/2R6rzS+CVIgVKTjyumiRewPJ6GL0EiwqNzxOpd/lgzBSvTz8+bwCgkzTY +dk4zMaQPcxWgcyZsZBdn4wEEALlxfbBdRcSBzmEaKAbvn3wdH2mVnQnF1D1kaLjg +wrKvT/+DeF3DFfkk7NQQGm8S9iC2zp3CGFfeuGvCiXBz+h8cIRflvlQBFDNyB8nH +/RDTYQAL2oHqMNnHaCFA/Ym6awai/mCpsHy3+hjWL8zEXI7fqzezqzYDOXqYTxlL ++7vMA/40OzbjojnbPnOgp0wDxqFBFVRXDO2rDZ9+98nYdFvHTNcrm29Qo/fefNDR +WpWJlO3Ye+A9B5QiFF02p0GY74d/+i5dlO7wujQeUHUfjmXViFRcA7m3daWXsh/x +hIKKzq6I4t81VxQ46l/jZZtCJmEdv21ZXAbxdKgy1Kte+EbFELQjV2lsbGVtIEpp +YW5nIDxuaW5namlhbmdAYXBhY2hlLm9yZz6IYQQTEQIAIQIbAwIeAQIXgAUCTSaG +DAULCQgHAwUVCgkICwUWAgMBAAAKCRAjUJKYro3p5KGGAJ0aqivakzgKZ964ESKW +NEGZcK/3QACgg8omZy1yITGEcld+AOHoSTThTzWIR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pR2sqTvM7RP7kud2H3fo9/GHbt58Dk +vrQvF8aDNiEKOOKytmydZuwBPghcwttaypSsRgH61egLf9IQr7ipA8TNQzShZiNG +KfLWBUnkApV+Pf6hjwPDP4ovxoVMIX4zlW9X+n/Mqoe5JY4JnQpbr0YQs4u6fWrt +G1OwbUVPe0pZ+aa9RnXkasUYX/84PZyl165ujySW14m+HIN9wdIa0d1mtq8o1OpL +H/wA9YT1/Q5EOMr8ImT/XsYdY/HO9R1jAzEiKPdpyBnZEzKwphmwf0OxB4DUMK9v +gdI8FIT+2aUKZfUunO1m93eHp5opNDeLYiAtipvVtuHw3ohGBBARAgAGBQJNJpN0 +AAoJECNQkpiujenkNg0An1WchSzn6tXHRZDzAOOFV5OB+zO1AJ0W9MWwkQePkAH/ +p/+P+/F6TnvWiLkCDQRNJo74ARAA2PnpDUaVyCt+KF7ifQ2ebdDP1+9iJjqVERE4 +Qyarh1a98RX4Awsj9ZsEtkTRM+zadIO6oJpJWHBMOh+c0apgor3bXgMcv4ooSOM0 +lp9B7KgcZzYraWhw1DH8IAw9mAWx3K00yEAv5HhgSM+x1YEaCtIJXJEhkFoS8KDw +58ydrKyCsQs/p/U2O8wCPoeqJTt9eBp/Dj8nTa/Epv2FDFmDkPYufDKEpU23hSFJ +oDJfbF/xPOFTp9QHTmpHh6adzp9IEsqBIP8515nDlj+JO63G2+gTsRaUBE9iv13F +yk2C4+oqRO4WovYqz/316YK9BXSL3BcsYIOHiSpWhKm6Ruoyjf4+um4f2oc9Ur2u +Y3+J47X9HBFHLZksEImseGXPHRweX685QGednKCNKwmZ8yvt8aOebrvPlBYImgPw +MXsxVdZTFSZJj5gkrY0H1HoW+weu6O/UOoW7bFs7bzOFCsVDnWJu8O0mYmFaPVNC +mjo+9IcKH29TGJ7XoOUjn7GbYHHQsjUWqkk19LkHvZVF7J
svn commit: r1195144 - in /camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/
Author: davsclaus Date: Sun Oct 30 10:54:51 2011 New Revision: 1195144 URL: http://svn.apache.org/viewvc?rev=1195144&view=rev Log: CAMEL-4225: Added disconnect option to camel-mail. Added: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDisconnectTest.java - copied, changed from r1195125, camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java?rev=1195144&r1=1195143&r2=1195144&view=diff == --- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java (original) +++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java Sun Oct 30 10:54:51 2011 @@ -62,6 +62,7 @@ public class MailConfiguration implement private String alternativeBodyHeader = MailConstants.MAIL_ALTERNATIVE_BODY; private boolean useInlineAttachments; private boolean ignoreUnsupportedCharset; +private boolean disconnect; public MailConfiguration() { } @@ -462,4 +463,12 @@ public class MailConfiguration implement public void setIgnoreUnsupportedCharset(boolean ignoreUnsupportedCharset) { this.ignoreUnsupportedCharset = ignoreUnsupportedCharset; } + +public boolean isDisconnect() { +return disconnect; +} + +public void setDisconnect(boolean disconnect) { +this.disconnect = disconnect; +} } Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?rev=1195144&r1=1195143&r2=1195144&view=diff == --- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java (original) +++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java Sun Oct 30 10:54:51 2011 @@ -137,6 +137,19 @@ public class MailConsumer extends Schedu } } +// should we disconnect, the header can override the configuration +boolean disconnect = getEndpoint().getConfiguration().isDisconnect(); +if (disconnect) { +LOG.debug("Disconnecting from {}", getEndpoint().getConfiguration().getMailStoreLogInformation()); +try { +store.close(); +} catch (Exception e) { +LOG.debug("Could not disconnect from {}: " + getEndpoint().getConfiguration().getMailStoreLogInformation(), e); +} +store = null; +folder = null; +} + return polledMessages; } @@ -356,7 +369,7 @@ public class MailConsumer extends Schedu buffer.append(header.getName()).append("=").append(header.getValue()).append("\n"); } if (buffer.length() > 0) { -LOG.debug("Generating UID from the following:\n" + buffer); +LOG.trace("Generating UID from the following:\n {}", buffer); uid = UUID.nameUUIDFromBytes(buffer.toString().getBytes()).toString(); } } catch (MessagingException e) { Copied: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDisconnectTest.java (from r1195125, camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java) URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDisconnectTest.java?p2=camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDisconnectTest.java&p1=camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java&r1=1195125&r2=1195144&rev=1195144&view=diff == --- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailBatchConsumerTest.java (original) +++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailDisconnectTest.java Sun Oct 30 10:54:51 2011 @@ -16,79 +16,41 @@ */ package org.apache.camel.component.mail; -import javax.mail.Folder; -import javax.mail.Message; -import javax.mail.Store; -import javax.m
[CONF] Apache Camel > Mail
Mail Page edited by Claus Ibsen Changes (1) ... | {{consumer.delay}} | {{6}} | As of *Camel 1.4*, the default consumer delay is now 60 seconds. Camel will therefore only poll the mailbox once a minute to avoid overloading the mail server. The default value in Camel 1.3 is 500 milliseconds. | | {{consumer.useFixedDelay}} | {{false}} | Set to {{true}} to use a fixed delay between polls, otherwise fixed rate is used. See [ScheduledExecutorService|http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html] in JDK for details. | | {{disconnect}} | {{false}} | *Camel 2.9:* Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. | | {{mail.XXX}} | {{null}} | As of *Camel 2.0*, you can set any [additional java mail properties|http://java.sun.com/products/javamail/javadocs/index.html]. For instance if you want to set a special property when using POP3 you can now provide the option directly in the URI such as: {{mail.pop3.forgettopheaders=true}}. You can set multiple such options, for example: {{mail.pop3.forgettopheaders=true&mail.mime.encodefilename=true}}. | | {{mapMailMessage}} | {{true}} | *Camel 2.8:* Specifies whether Camel should map the received mail message to Camel body/headers. If set to true, the body of the mail message is mapped to the body of the Camel IN message and the mail headers are mapped to IN headers. If this option is set to false then the IN message contains a raw {{javax.mail.Message}}. You can retrieve this raw message by calling {{exchange.getIn().getBody(javax.mail.Message.class)}}. ... Full Content Mail Component The mail component provides access to Email via Spring's Mail support and the underlying JavaMail system. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mail x.x.x Geronimo mail .jarWe have discovered that the geronimo mail .jar (v1.6) has a bug when polling mails with attachments. It cannot correctly identify the Content-Type. So, if you attach a .jpeg file to a mail and you poll it, the Content-Type is resolved as text/plain and not as image/jpeg. For that reason, we have added an org.apache.camel.component.ContentTypeResolver SPI interface which enables you to provide your own implementation and fix this bug by returning the correct Mime type based on the file name. So if the file name ends with jpeg/jpg, you can return image/jpeg. You can set your custom resolver on the MailComponent instance or on the MailEndpoint instance. This feature is added in Camel 1.6.2/2.0. POP3 or IMAPPOP3 has some limitations and end users are encouraged to use IMAP if possible. Using mock-mail for testingYou can use a mock framework for unit testing, which allows you to test without the need for a real mail server. However you should remember to not include the mock-mail when you go into production or other environments where you need to send mails to a real mail server. Just the presence of the mock-javamail.jar on the classpath means that it will kick in and avoid sending the mails. URI format Mail endpoints can have one of the following URI formats (for the protocols, SMTP, POP3, or IMAP, respectively): smtp://[username@]host[:port][?options] pop3://[username@]host[:port][?options] imap://[username@]host[:port][?options] The mail component also supports secure variants of these protocols (layered over SSL). You can enable the secure protocols by adding s to the scheme: smtps://[username@]host[:port][?options] pop3s://[username@]host[:port][?options] imaps://[username@]host[:port][?options] You can append query options to the URI in the following format, ?option=value&option=value&... Sample endpoints Typically, you specify a URI with login credentials as follows (taking SMTP as an example): smtp://[username@]host[:port][?password=somepwd] Alternatively, it is possible to specify both the user name and the password as query options: smtp://host[:port]?password=somepwd&username=someuser For example: smtp://mycompany.mailserver:30?password=tiger&username=scott Default ports As of Camel 1.4, default port numbers are supported. If the port number is omitted, Camel determines the port number to use based on the protocol. Protocol Default Port Number SMTP 25 SMTPS 465 POP3 110 POP3S 995 IMAP 143 IMAPS 993 Options Property Default Description host The host name or IP address to connect to. port See DefaultPorts The TCP port number to connect on. username The user name on the email server. password null The password on the email se
[CONF] Apache Camel > FTP2
FTP2 Page edited by Claus Ibsen Changes (1) ... | {{separator}} | {{Auto}} | *Camel 2.6:* Dictates what path separator char to use when uploading files. {{Auto}} = Use the path provided without altering it. {{UNIX}} = Use unix style path separators. {{Windows}} = Use Windows style path separators. | | {{chmod}} | {{null}} | *SFTP Producer Only:* *Camel 2.9:* Allows you to set chmod on the stored file. For example {{chmod=640}}. | | {{compression}} | 0 | *SFTP Only:* *Camel 2.9:* To use compression. Specify a level from 1 to 10. *Important:* You must manually add the needed JSCH zlib JAR to the classpath for compression support. | | {{ftpClient}} | {{null}} | *FTP and FTPS Only:* *Camel 2.1:* Allows you to use a custom {{org.apache.commons.net.ftp.FTPClient}} instance. | | {{ftpClientConfig}} | {{null}} | *FTP and FTPS Only:* *Camel 2.1:* Allows you to use a custom {{org.apache.commons.net.ftp.FTPClientConfig}} instance. | ... Full Content FTP/SFTP/FTPS Component - Camel 2.0 onwards This component provides access to remote file systems over the FTP and SFTP protocols. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-ftp x.x.x Using Camel 1.xIf you are using Camel 1.x then see this link for documentation. This page is only for Camel 2.0 or newer. More optionsSee File2 for more options as all the options from File2 is inherited. Consuming from remote FTP serverMake sure you read the section titled Default when consuming files further below for details related to consuming files. URI format ftp://[username@]hostname[:port]/directoryname[?options] sftp://[username@]hostname[:port]/directoryname[?options] ftps://[username@]hostname[:port]/directoryname[?options] Where directoryname represents the underlying directory. Can contain nested folders. If no username is provided, then anonymous login is attempted using no password. If no port number is provided, Camel will provide default values according to the protocol (ftp = 21, sftp = 22, ftps = ). You can append query options to the URI in the following format, ?option=value&option=value&... This component uses two different libraries for the actual FTP work. FTP and FTPS uses Apache Commons Net while SFTP uses JCraft JSCH. The FTPS component is only available in Camel 2.2 or newer. FTPS (also known as FTP Secure) is an extension to FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols. URI Options The options below are exclusive for the FTP2 component. More optionsSee File2 for more options as all the options from File2 is inherited. Name Default Value Description username null Specifies the username to use to log in to the remote file systen. password null Specifies the password to use to log in to the remote file system. binary false Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). disconnect false Camel 2.2: Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. localWorkDirectory null When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file and thus can conserve memory. See below for more details. passiveMode false FTP and FTPS only: Specifies whether to use passive mode connections. Default is active mode (false). securityProtocol TLS FTPS only: Sets the underlying security protocol. The following values are defined: TLS: Transport Layer Security SSL: Secure Sockets Layer disableSecureDataChannelDefaults false Camel 2.4: FTPS only: Whether or not to disable using default values for execPbsz and execProt when using secure data transfer. You can set this option to true if you want to be in absolute full control what the options execPbsz and execProt should be used. execProt null Camel 2.4: FTPS only: Will by default use option P if secure data channel defaults hasn't been disabled. Possible values are: C: Clear S: Safe (SSL protocol only) E: Confidential (SSL protocol only) P: Private execPbsz null Camel 2.4: FTPS only: This option specifies the buffer size of the secure data channel. If option useSecureDataChannel has been enabled and this option has not been explicit set, then value 0 is used. isImplicit false FTPS onl
svn commit: r1195143 - in /camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote: SftpConfiguration.java SftpOperations.java
Author: davsclaus Date: Sun Oct 30 10:20:43 2011 New Revision: 1195143 URL: http://svn.apache.org/viewvc?rev=1195143&view=rev Log: CAMEL-4522: Added compression option to SFTP. Thanks to Eugene for patch. Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java?rev=1195143&r1=1195142&r2=1195143&view=diff == --- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java (original) +++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java Sun Oct 30 10:20:43 2011 @@ -33,7 +33,8 @@ public class SftpConfiguration extends R private String chmod; // comma separated list of ciphers. // null means default jsch list will be used -private String ciphers; +private String ciphers; +private int compression; public SftpConfiguration() { setProtocol("sftp"); @@ -112,4 +113,11 @@ public class SftpConfiguration extends R return ciphers; } +public int getCompression() { +return compression; +} + +public void setCompression(int compression) { +this.compression = compression; +} } Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java?rev=1195143&r1=1195142&r2=1195143&view=diff == --- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java (original) +++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java Sun Oct 30 10:20:43 2011 @@ -146,17 +146,15 @@ public class SftpOperations implements R SftpConfiguration sftpConfig = (SftpConfiguration) configuration; if (isNotEmpty(sftpConfig.getCiphers())) { -LOG.debug("Using ciphers: " + sftpConfig.getCiphers()); +LOG.debug("Using ciphers: {}", sftpConfig.getCiphers()); Hashtable ciphers = new Hashtable(); - ciphers.put("cipher.s2c", sftpConfig.getCiphers()); ciphers.put("cipher.c2s", sftpConfig.getCiphers()); - JSch.setConfig(ciphers); } if (isNotEmpty(sftpConfig.getPrivateKeyFile())) { -LOG.debug("Using private keyfile: " + sftpConfig.getPrivateKeyFile()); +LOG.debug("Using private keyfile: {}", sftpConfig.getPrivateKeyFile()); if (isNotEmpty(sftpConfig.getPrivateKeyFilePassphrase())) { jsch.addIdentity(sftpConfig.getPrivateKeyFile(), sftpConfig.getPrivateKeyFilePassphrase()); } else { @@ -165,20 +163,28 @@ public class SftpOperations implements R } if (isNotEmpty(sftpConfig.getKnownHostsFile())) { -LOG.debug("Using knownhosts file: " + sftpConfig.getKnownHostsFile()); +LOG.debug("Using knownhosts file: {}", sftpConfig.getKnownHostsFile()); jsch.setKnownHosts(sftpConfig.getKnownHostsFile()); } final Session session = jsch.getSession(configuration.getUsername(), configuration.getHost(), configuration.getPort()); if (isNotEmpty(sftpConfig.getStrictHostKeyChecking())) { -LOG.debug("Using StrickHostKeyChecking: " + sftpConfig.getStrictHostKeyChecking()); +LOG.debug("Using StrickHostKeyChecking: {}", sftpConfig.getStrictHostKeyChecking()); session.setConfig("StrictHostKeyChecking", sftpConfig.getStrictHostKeyChecking()); } session.setServerAliveInterval(sftpConfig.getServerAliveInterval()); session.setServerAliveCountMax(sftpConfig.getServerAliveCountMax()); +// compression +if (sftpConfig.getCompression() > 0) { +LOG.debug("Using compression: {}", sftpConfig.getCompression()); +session.setConfig("compression.s2c","z...@openssh.com,zlib,none"); +session.setConfig("compression.c2s","z...@openssh.com,zlib,none"); +session.setConfig("compression_level", Integer.toString(sftpConfig.getCompression())); +} + // set user information session.setUserInfo(new ExtendedUserInfo() { public String getPassphrase() {
svn commit: r1195142 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/model/language/ main/java/org/apache/camel/support/ test/java/org/apache/camel/language/
Author: davsclaus Date: Sun Oct 30 10:12:33 2011 New Revision: 1195142 URL: http://svn.apache.org/viewvc?rev=1195142&view=rev Log: CAMEL-4595: Polished Added: camel/trunk/camel-core/src/test/java/org/apache/camel/language/TokenPairPredicateTest.java - copied, changed from r1195125, camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathFromFileExceptionTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/TokenizerExpression.java camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java camel/trunk/camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/TokenizerExpression.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/TokenizerExpression.java?rev=1195142&r1=1195141&r2=1195142&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/TokenizerExpression.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/TokenizerExpression.java Sun Oct 30 10:12:33 2011 @@ -23,7 +23,9 @@ import javax.xml.bind.annotation.XmlRoot import org.apache.camel.CamelContext; import org.apache.camel.Expression; +import org.apache.camel.Predicate; import org.apache.camel.language.tokenizer.TokenizeLanguage; +import org.apache.camel.util.ExpressionToPredicateAdapter; /** * For expressions and predicates using a body or header tokenizer. @@ -95,6 +97,12 @@ public class TokenizerExpression extends } @Override +public Predicate createPredicate(CamelContext camelContext) { +Expression exp = createExpression(camelContext); +return ExpressionToPredicateAdapter.toPredicate(exp); +} + +@Override public String toString() { if (endToken != null) { return "tokenize{body() using tokens: " + token + "..." + endToken + "}"; Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java?rev=1195142&r1=1195141&r2=1195142&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java Sun Oct 30 10:12:33 2011 @@ -24,6 +24,7 @@ import java.util.Scanner; import org.apache.camel.Exchange; import org.apache.camel.InvalidPayloadException; +import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; /** @@ -51,7 +52,9 @@ public class TokenPairExpressionIterator public Object evaluate(Exchange exchange) { try { InputStream in = exchange.getIn().getMandatoryBody(InputStream.class); -return new TokenPairIterator(startToken, endToken, in); +// we may read from a file, and want to support custom charset defined on the exchange +String charset = IOHelper.getCharsetName(exchange); +return new TokenPairIterator(startToken, endToken, in, charset); } catch (InvalidPayloadException e) { exchange.setException(e); return null; @@ -73,11 +76,11 @@ public class TokenPairExpressionIterator private final Scanner scanner; private Object image; -private TokenPairIterator(String startToken, String endToken, InputStream in) { +private TokenPairIterator(String startToken, String endToken, InputStream in, String charset) { this.startToken = startToken; this.endToken = endToken; // use end token as delimiter -this.scanner = new Scanner(in).useDelimiter(endToken); +this.scanner = new Scanner(in, charset).useDelimiter(endToken); // this iterator will do look ahead as we may have data // after the last end token, which the scanner would find // so we need to be one step ahead of the scanner Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/language/TokenPairPredicateTest.java (from r1195125, camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathFromFileExceptionTest.java) URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/TokenPairPredicateTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/language/TokenPairPredicateTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathFromFileExceptionTest.java&r1=1195125&r2=1195142&rev=1195142&view=diff