@Component(value="ssh")
public class SshComponent
extends org.apache.camel.support.DefaultComponent
SshEndpoint.| Constructor and Description |
|---|
SshComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.camel.Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters) |
String |
getCertResource() |
String |
getCertResourcePassword() |
SshConfiguration |
getConfiguration() |
String |
getHost() |
org.apache.sshd.common.keyprovider.KeyPairProvider |
getKeyPairProvider() |
String |
getKeyType() |
String |
getPassword() |
String |
getPollCommand() |
int |
getPort() |
long |
getTimeout() |
String |
getUsername() |
void |
setCertResource(String certResource)
Sets the resource path of the certificate to use for Authentication.
|
void |
setCertResourcePassword(String certResourcePassword)
Sets the password to use in loading certResource, if certResource is an encrypted key.
|
void |
setChannelType(String channelType)
Sets the channel type to pass to the Channel as part of command execution.
|
void |
setConfiguration(SshConfiguration configuration)
To use the shared SSH configuration
|
void |
setHost(String host)
Sets the hostname of the remote SSH server.
|
void |
setKeyPairProvider(org.apache.sshd.common.keyprovider.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 |
setShellPrompt(String shellPrompt)
Sets the shellPrompt to be dropped when response is read after command execution
|
void |
setSleepForShellPrompt(long sleepForShellPrompt)
Sets the sleep period in milliseconds to wait reading response from shell prompt.
|
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.
|
afterConfiguration, createEndpoint, createEndpoint, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIbuild, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendprotected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint in class org.apache.camel.support.DefaultComponentExceptionpublic SshConfiguration getConfiguration()
public void setConfiguration(SshConfiguration configuration)
public String getHost()
public void setHost(String host)
host - String representing hostname of SSH server.public int getPort()
public void setPort(int port)
port - int representing port number on remote host. Defaults to 22.public String getUsername()
@Metadata(label="security",
secret=true)
public void setUsername(String username)
username - String representing login username.public String getPassword()
@Metadata(label="security",
secret=true)
public void setPassword(String password)
password - String representing password for username at remote host.public String getPollCommand()
public void setPollCommand(String pollCommand)
pollCommand - String representing the command to send.public org.apache.sshd.common.keyprovider.KeyPairProvider getKeyPairProvider()
@Metadata(label="security") public void setKeyPairProvider(org.apache.sshd.common.keyprovider.KeyPairProvider keyPairProvider)
keyPairProvider - KeyPairProvider reference to use in authenticating. If set to 'null',
then will attempt to connect using username/password settings.KeyPairProviderpublic String getKeyType()
@Metadata(label="security") public void setKeyType(String keyType)
keyType - String defining the type of KeyPair to use for authentication.KeyPairProviderpublic long getTimeout()
public void setTimeout(long timeout)
timeout - long milliseconds to wait.public String getCertResource()
@Metadata(label="security") public void setCertResource(String certResource)
ResourceHelperKeyPairProvider to resolve file based certificate, and depends on keyType setting.certResource - String file, classpath, or http url for the certificatepublic String getCertResourcePassword()
@Metadata(label="security",
secret=true)
public void setCertResourcePassword(String certResourcePassword)
certResourcePassword - String representing password use to load the certResource key@Metadata(label="advanced") public void setChannelType(String channelType)
channelType - String defining the type of Channel to use for command execution.Channel@Metadata(label="advanced") public void setShellPrompt(String shellPrompt)
shellPrompt - String defining ending string of command line which has to be dropped when response is
read after command execution.@Metadata(label="advanced") public void setSleepForShellPrompt(long sleepForShellPrompt)
sleepForShellPrompt - long milliseconds to wait.Apache Camel