camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Jsch
Date Wed, 18 Apr 2012 19:12:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/Jsch">Jsch</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~hadrian@apache.org">Hadrian
Zbarcea</a>
    </h4>
        <br/>
                         <h4>Changes (7)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >You can append query options to the
URI in the following format, {{?option=value&amp;option=value&amp;...}} <br>
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The
file name can be specified either in the &lt;path&gt; part of the URI or as a &quot;CamelFileName&quot;
header on the message ({{Exchange.FILE_NAME}} if used in code). <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. Options <br>{div:class=confluenceTableSmall}
<br>|| Name || Description || Example || Default Value || <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{username}} | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{null}}
|</span> Specifies the username to use to log in to the remote file system. | <span
class="diff-added-words"style="background-color: #dfd;">| {{null}} |</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{password}} | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{null}}
|</span> Specifies the password to use to log in to the remote file system. | <span
class="diff-added-words"style="background-color: #dfd;">| {{null}} |</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >| {{knownHostsFile}} | <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{null}}
|</span> Sets the {{known_hosts}} file, so that the scp endpoint can do host key verification.
| <span class="diff-added-words"style="background-color: #dfd;">| {{null}} |</span>
<br></td></tr>
            <tr><td class="diff-changed-lines" >| {{strictHostKeyChecking}} |
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{no}}
|</span> Sets whether to use strict host key checking. Possible values are: {{no}},
{{yes}} | <span class="diff-added-words"style="background-color: #dfd;">| {{no}} |</span>
<br></td></tr>
            <tr><td class="diff-changed-lines" >| {{chmod}} | <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{null}}
|</span> Allows you to set chmod on the stored file. For example {{chmod=664}}. | <span
class="diff-added-words"style="background-color: #dfd;">| {{null}} |</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3.
Limitations <br> <br>Currently camel-jsch only supports a [Producer|http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html]
(i.e. copy files to another host). The reason is that the scp protocol does not offer the
possibility to scan (list) the content of a directory. As such a polling consumer cannot watch
for changes and trigger events on changes. It is possible however to use camel-jsch in sink
mode for one time copy from a remote host using a [ConsumerTemplate|http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ConsumerTemplate.html]
(see [Polling Consumer](s) for more details). <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{include:Endpoint See Also} <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="Jsch-Jsch"></a>Jsch</h2>

<p>The <b>camel-jsch</b> component supports the <a href="http://en.wikipedia.org/wiki/Secure_copy"
class="external-link" rel="nofollow">SCP protocol</a> using the Client API of the
<a href="http://www.jcraft.com/jsch/" class="external-link" rel="nofollow">Jsch</a>
project. Jsch is already used in camel by the <a href="/confluence/display/CAMEL/FTP" title="FTP">FTP</a>
component for the <b>sftp:</b> protocol.</p>

<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt>
for this component:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;dependency&gt;</span>
    <span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span
class="code-tag">&lt;/groupId&gt;</span>
    <span class="code-tag">&lt;artifactId&gt;</span>camel-jsch<span
class="code-tag">&lt;/artifactId&gt;</span>
    <span class="code-tag">&lt;version&gt;</span>${camel.version}<span
class="code-tag">&lt;/version&gt;</span> <span class="code-tag"><span
class="code-comment">&lt;!-- use the same version as your Camel core version --&gt;</span></span>
<span class="code-tag">&lt;/dependency&gt;</span>
</pre>
</div></div>

<h3><a name="Jsch-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
scp:<span class="code-comment">//host[:port]/destination[?options]</span>
</pre>
</div></div>

<p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>

<p>The file name can be specified either in the &lt;path&gt; part of the URI
or as a "CamelFileName" header on the message (<tt>Exchange.FILE_NAME</tt> if
used in code).</p>

<h3><a name="Jsch-Options"></a>Options</h3>
<div class="confluenceTableSmall"></div>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Example </th>
<th class='confluenceTh'> Default Value </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>username</tt> </td>
<td class='confluenceTd'> Specifies the username to use to log in to the remote file
system. </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>password</tt> </td>
<td class='confluenceTd'> Specifies the password to use to log in to the remote file
system. </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>knownHostsFile</tt> </td>
<td class='confluenceTd'> Sets the <tt>known_hosts</tt> file, so that the
scp endpoint can do host key verification. </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>strictHostKeyChecking</tt> </td>
<td class='confluenceTd'> Sets whether to use strict host key checking. Possible values
are: <tt>no</tt>, <tt>yes</tt> </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> <tt>no</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>chmod</tt> </td>
<td class='confluenceTd'> Allows you to set chmod on the stored file. For example <tt>chmod=664</tt>.
</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
</tbody></table>
</div>


<h3><a name="Jsch-Limitations"></a>Limitations</h3>

<p>Currently camel-jsch only supports a <a href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html"
class="external-link" rel="nofollow">Producer</a> (i.e. copy files to another host).
The reason is that the scp protocol does not offer the possibility to scan (list) the content
of a directory. As such a polling consumer cannot watch for changes and trigger events on
changes. It is possible however to use camel-jsch in sink mode for one time copy from a remote
host using a <a href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ConsumerTemplate.html"
class="external-link" rel="nofollow">ConsumerTemplate</a> (see <a href="/confluence/display/CAMEL/Polling+Consumer"
title="Polling Consumer">Polling Consumer</a>(s) for more details).</p>

<h3><a name="Jsch-SeeAlso"></a>See Also</h3>
<ul>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
Camel</a></li>
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting
Started</a></li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Jsch">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=27842935&revisedVersion=3&originalVersion=2">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Jsch?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message