org.apache.camel.component.ssh
Class SshConfiguration

java.lang.Object
  extended by org.apache.camel.component.ssh.SshConfiguration
All Implemented Interfaces:
Cloneable

@UriParams
public class SshConfiguration
extends Object
implements Cloneable


Field Summary
static int DEFAULT_SSH_PORT
           
 
Constructor Summary
SshConfiguration()
           
SshConfiguration(URI uri)
           
 
Method Summary
 void configure(URI uri)
           
 SshConfiguration copy()
           
 String getCertFilename()
          Deprecated. As of version 2.11, replaced by getCertResource()
 String getCertResource()
           
 String getHost()
           
 org.apache.sshd.common.KeyPairProvider getKeyPairProvider()
           
 String getKeyType()
           
 String getPassword()
           
 String getPollCommand()
           
 int getPort()
           
 long getTimeout()
           
 String getUsername()
           
 void setCertFilename(String certFilename)
          Deprecated. As of version 2.11, replaced by setCertResource(String)
 void setCertResource(String certResource)
          Sets the resource path of the certificate to use for Authentication.
 void setHost(String host)
          Sets the hostname of the remote SSH server.
 void setKeyPairProvider(org.apache.sshd.common.KeyPairProvider keyPairProvider)
          Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH Server.
 void setKeyType(String keyType)
          Sets the key type to pass to the KeyPairProvider as part of authentication.
 void setPassword(String password)
          Sets the password to use in connecting to remote SSH server.
 void setPollCommand(String pollCommand)
          Sets the command string to send to the remote SSH server during every poll cycle.
 void setPort(int port)
          Sets the port number for the remote SSH server.
 void setTimeout(long timeout)
          Sets the timeout in milliseconds to wait in establishing the remote SSH server connection.
 void setUsername(String username)
          Sets the username to use in logging into the remote SSH server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SSH_PORT

public static final int DEFAULT_SSH_PORT
See Also:
Constant Field Values
Constructor Detail

SshConfiguration

public SshConfiguration()

SshConfiguration

public SshConfiguration(URI uri)
Method Detail

configure

public void configure(URI uri)

copy

public SshConfiguration copy()

getUsername

public String getUsername()

setUsername

public void setUsername(String username)
Sets the username to use in logging into the remote SSH server.

Parameters:
username - String representing login username.

getHost

public String getHost()

setHost

public void setHost(String host)
Sets the hostname of the remote SSH server.

Parameters:
host - String representing hostname of SSH server.

getPort

public int getPort()

setPort

public void setPort(int port)
Sets the port number for the remote SSH server.

Parameters:
port - int representing port number on remote host. Defaults to 22.

getPassword

public String getPassword()

setPassword

public void setPassword(String password)
Sets the password to use in connecting to remote SSH server. Requires keyPairProvider to be set to null.

Parameters:
password - String representing password for username at remote host.

getPollCommand

public String getPollCommand()

setPollCommand

public void setPollCommand(String pollCommand)
Sets the command string to send to the remote SSH server during every poll cycle. Only works with camel-ssh component being used as a consumer, i.e. from("ssh://...")

Parameters:
pollCommand - String representing the command to send.

getKeyPairProvider

public org.apache.sshd.common.KeyPairProvider getKeyPairProvider()

setKeyPairProvider

public void setKeyPairProvider(org.apache.sshd.common.KeyPairProvider keyPairProvider)
Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH Server.

Parameters:
keyPairProvider - KeyPairProvider reference to use in authenticating. If set to 'null', then will attempt to connect using username/password settings.
See Also:
KeyPairProvider

getKeyType

public String getKeyType()

setKeyType

public void setKeyType(String keyType)
Sets the key type to pass to the KeyPairProvider as part of authentication. KeyPairProvider.loadKey(...) will be passed this value. Defaults to "ssh-rsa".

Parameters:
keyType - String defining the type of KeyPair to use for authentication.
See Also:
KeyPairProvider

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)
Sets the timeout in milliseconds to wait in establishing the remote SSH server connection. Defaults to 30000 milliseconds.

Parameters:
timeout - long milliseconds to wait.

getCertFilename

public String getCertFilename()
Deprecated. As of version 2.11, replaced by getCertResource()


setCertFilename

public void setCertFilename(String certFilename)
Deprecated. As of version 2.11, replaced by setCertResource(String)


getCertResource

public String getCertResource()

setCertResource

public void setCertResource(String certResource)
Sets the resource path of the certificate to use for Authentication. Will use ResourceHelperKeyPairProvider to resolve file based certificate, and depends on keyType setting.

Parameters:
certResource - String file, classpath, or http url for the certificate


Apache Camel