Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3b2436b
initial implementation of camel-ssh
Dec 19, 2011
449d870
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 19, 2011
0e6fe3e
add OSGi settings to camel-ssh
Dec 20, 2011
935fb57
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 20, 2011
535ca30
creating camel-example-ssh
Dec 22, 2011
822e714
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 22, 2011
2611a2b
camel-example-ssh working in karaf
Dec 23, 2011
aa22226
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 23, 2011
8f3c72e
merged with camel trunk
Dec 23, 2011
dbbe27b
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 29, 2011
761200b
merged with latest Camel trunk
Dec 29, 2011
d076690
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 29, 2011
3f193f1
Cleanup to make check style happy
Dec 29, 2011
7a58fe1
Fixed default port configuration
Dec 29, 2011
8978bd9
Removed debugging System.out.println
Dec 29, 2011
58e5f2c
Created Polling Consumer for camel-ssh
Dec 29, 2011
4e43812
Updated to use AvailablePortFinder in unit tests
Dec 29, 2011
cea1d91
Updated camel-example-ssh to use Polling SSH component
Dec 29, 2011
cf8dbed
Changed to use CHANNEL_EXEC (versus CHANNEL_SHELL) as that better mat…
Dec 29, 2011
7f84d11
Upgraded to sshd-core:0.6.0 and mina-core:2.0.2
Dec 30, 2011
be288f3
Fixed configuring Polling consumer
Dec 30, 2011
cf2f033
Consolidated SSH code into SshEndpoint
Dec 30, 2011
ac432e0
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 30, 2011
39af09c
minor cleanup
Dec 30, 2011
6bf1499
Updated Camel-ssh unit tests to work (and test) correctly using CHANN…
Dec 30, 2011
38f73a2
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Dec 30, 2011
e268f4f
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 3, 2012
2f036bb
Added reconnect test
Jan 4, 2012
2e9c694
Added SSH Key support using configuration approach similar to JmsComp…
Jan 4, 2012
d3d9de6
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 4, 2012
3bf54f7
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 5, 2012
c9d44b9
Propagate Message headers in Producer
Jan 5, 2012
4554ef7
Added connection timeout parameter and unit test
Jan 5, 2012
76e68fa
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 6, 2012
8d23710
added support for retries and reconnection delays
whaley Jan 6, 2012
1f510e4
Merge pull request #1 from whaley/camel-ssh
scranton Jan 6, 2012
36e5252
Merge branch 'camel-ssh' of https://github.com/scranton/camel into ca…
Jan 6, 2012
7d3b34a
minor code cleanup
Jan 6, 2012
6968b4d
added maximumReconnectAttempts and reconnectDelay parameters for comp…
Jan 6, 2012
9d39e40
more cleanup
Jan 6, 2012
49554b8
Refactored unit tests and added Redelivery test
Jan 6, 2012
b0a82ac
Reduced logging in unit tests to reduce noise
Jan 6, 2012
a73b8e4
Cleanup imports
Jan 6, 2012
962f3b4
Removed maximumReconnectAttempts and reconnectDelay as Camel ErrorHan…
Jan 6, 2012
a897d1b
added package.html
Jan 6, 2012
070d8e2
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 27, 2012
e1cfdfa
updated doc
Jan 27, 2012
30fb97e
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 27, 2012
c05c03c
Merge branch 'trunk' of https://github.com/apache/camel into camel-ssh
Jan 29, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions components/camel-ssh/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

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.

-->
<project xmlns="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">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
<version>2.10-SNAPSHOT</version>
<relativePath>../../parent</relativePath>
</parent>

<artifactId>camel-ssh</artifactId>
<packaging>bundle</packaging>
<name>Camel :: SSH</name>
<description>Camel SSH support</description>

<properties>
<camel.osgi.export.pkg>org.apache.camel.component.ssh.*</camel.osgi.export.pkg>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>0.6.0</version>
</dependency>

<!-- for testing -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk15</artifactId>
<version>140</version>
<scope>test</scope>
</dependency>

<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/**
* 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.component.ssh;

import java.net.*;
import java.util.*;

import org.apache.camel.Endpoint;
import org.apache.camel.impl.DefaultComponent;
import org.apache.sshd.common.KeyPairProvider;

/**
* Represents the component that manages {@link SshEndpoint}.
*/
public class SshComponent extends DefaultComponent {
private SshConfiguration configuration;

@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
SshConfiguration newConfig;

if (configuration == null) {
newConfig = new SshConfiguration(new URI(uri));
} else {
newConfig = configuration.copy();
}

SshEndpoint endpoint = new SshEndpoint(uri, this, newConfig);
setProperties(endpoint.getConfiguration(), parameters);
//setProperties(endpoint, parameters);
return endpoint;
}

public SshConfiguration getConfiguration() {
if (configuration == null) {
configuration = new SshConfiguration();
}
return configuration;
}

public void setConfiguration(SshConfiguration configuration) {
this.configuration = configuration;
}

public String getHost() {
return getConfiguration().getHost();
}

public void setHost(String host) {
getConfiguration().setHost(host);
}

public int getPort() {
return getConfiguration().getPort();
}

public void setPort(int port) {
getConfiguration().setPort(port);
}

public String getUsername() {
return getConfiguration().getUsername();
}

public void setUsername(String username) {
getConfiguration().setUsername(username);
}

public String getPassword() {
return getConfiguration().getPassword();
}

public void setPassword(String password) {
getConfiguration().setPassword(password);
}

public String getPollCommand() {
return getConfiguration().getPollCommand();
}

public void setPollCommand(String pollCommand) {
getConfiguration().setPollCommand(pollCommand);
}

public KeyPairProvider getKeyPairProvider() {
return getConfiguration().getKeyPairProvider();
}

public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
getConfiguration().setKeyPairProvider(keyPairProvider);
}

public String getKeyType() {
return getConfiguration().getKeyType();
}

public void setKeyType(String keyType) {
getConfiguration().setKeyType(keyType);
}

public long getTimeout() {
return getConfiguration().getTimeout();
}

public void setTimeout(long timeout) {
getConfiguration().setTimeout(timeout);
}
}
Loading