public abstract class AbstractProvider extends java.lang.Object implements SshProvider
SshProvider, providing some common
methods. All providers will probably want to extend this.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProvider(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
SshAgent |
connectToLocalAgent(java.lang.String application)
Create a connection to the local agent using default or auto-detected
settings.
|
SshAgent |
connectToLocalAgent(java.lang.String application,
int protocol)
Create a connection to the local agent using default or auto-detected
settings.
|
SshAgent |
connectToLocalAgent(java.lang.String application,
java.lang.String location,
int socketType,
int protocol)
Create a connection to the local agent.
|
SshClient |
createClient(SshConfiguration configuration)
Create a new client instance with the specified configuration.
|
SshHostKeyManager |
createHostKeyManager(SshConfiguration configuration)
Create a
SshHostKeyManager that may be used to list, add and remove
valid host keys. |
SshIdentityManager |
createIdentityManager(SshConfiguration configuration)
Create an @
SshIdentityManager (if supported) |
protected abstract SshClient |
doCreateClient(SshConfiguration configuration) |
protected abstract void |
doSupportsConfiguration(SshConfiguration configuration) |
java.lang.String |
getName()
Get the name of the library that is used for this provider.
|
protected void |
setSupportsDefaultConfiguration(boolean supportsDefaultConfiguration) |
boolean |
supportsConfiguration(SshConfiguration configuration)
Examine the configuration to see if this provider supports it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCapabilities, getSupportedCiphers, getSupportedCompression, getSupportedKeyExchange, getSupportedMAC, getSupportedPublicKey, seedprotected void setSupportsDefaultConfiguration(boolean supportsDefaultConfiguration)
public java.lang.String getName()
SshProvidergetName in interface SshProviderpublic final boolean supportsConfiguration(SshConfiguration configuration)
SshProvidersupportsConfiguration in interface SshProviderconfiguration - configurationpublic final SshClient createClient(SshConfiguration configuration)
SshProvider
IMPLEMENTATION NOTE: The provider implementation is expected to invoke
SshClient.init(SshProvider) after construction.
createClient in interface SshProviderconfiguration - configurationprotected abstract void doSupportsConfiguration(SshConfiguration configuration)
protected abstract SshClient doCreateClient(SshConfiguration configuration)
public SshIdentityManager createIdentityManager(SshConfiguration configuration)
SshProviderSshIdentityManager (if supported)createIdentityManager in interface SshProviderconfiguration - configurationpublic SshHostKeyManager createHostKeyManager(SshConfiguration configuration) throws SshException
SshProviderSshHostKeyManager that may be used to list, add and remove
valid host keys. An implementation is not required to provide this
functionality, but vendors do, so this interface provides a common way to
access them.createHostKeyManager in interface SshProviderconfiguration - configurationSshExceptionpublic SshAgent connectToLocalAgent(java.lang.String application, java.lang.String location, int socketType, int protocol) throws SshException
SshProviderconnectToLocalAgent in interface SshProviderapplication - the application connectinglocation - the location of the agent, in the form "localhost:port"socketType - the type of socket. One of
SshAgent.TCPIP_AGENT_SOCKET_TYPE or
SshAgent.UNIX_DOMAIN_AGENT_SOCKET_TYPE.protocol - protocol. One of SshAgent.AUTO_PROTOCOL,
SshAgent.OPENSSH_PROTOCOL or
SshAgent.RFC_PROTOCOL.SshExceptionpublic SshAgent connectToLocalAgent(java.lang.String application, int protocol) throws SshException
SshProviderconnectToLocalAgent in interface SshProviderapplication - the application connectingprotocol - protocol. One of SshAgent.AUTO_PROTOCOL,
SshAgent.OPENSSH_PROTOCOL or
SshAgent.RFC_PROTOCOL.SshExceptionpublic SshAgent connectToLocalAgent(java.lang.String application) throws SshException
SshProviderconnectToLocalAgent in interface SshProviderapplication - the application connectingSshExceptionCopyright © 2018. All rights reserved.