public class DefaultProviderFactory extends java.lang.Object implements SshProviderFactory
SshProviderFactory that by default
searches for known implementations on the classpath. It can also be
configured using system properties.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROVIDER_CLASS_NAME
System property name that may be set to use a specific provider
|
| Constructor and Description |
|---|
DefaultProviderFactory()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected static SshProvider |
createProviderInstance(java.lang.String className) |
static Capability[] |
getAllCapabilties()
Get all discovered
Capability. |
static java.lang.String[] |
getAllCiphers()
Get all discovered ciphers.
|
static java.lang.String[] |
getAllCompression()
Get all discovered compression algorithms.
|
static java.lang.String[] |
getAllKEX()
Get all discovered key exchange algorithms.
|
static java.lang.String[] |
getAllMAC()
Get all discovered message authentication code algorithms.
|
static SshProvider[] |
getAllProviders()
Get all discovered providers.
|
static java.lang.String[] |
getAllPublicKey()
Get all discovered public key algorithms.
|
protected static java.lang.ClassLoader |
getClassLoader() |
static SshProviderFactory |
getInstance()
Get a singleton instance of the client factory.
|
SshProvider |
getProvider()
Get the default provider.
|
SshProvider |
getProvider(SshConfiguration configuration)
Create a new
SshProvider using a specified configuration. |
static SshProvider |
getProviderByName(java.lang.String providerName)
Get a provider given it's name.
|
protected static SshProvider |
loadFromProperties(java.util.Properties properties) |
protected static SshProvider |
loadFromProperties(java.net.URL resource) |
protected static java.util.Properties |
loadProperties(java.net.URL resource) |
static void |
setProviderClassLoader(java.lang.ClassLoader classLoader)
Set the class loader to use to load providers.
|
public static final java.lang.String PROVIDER_CLASS_NAME
public static SshProviderFactory getInstance()
FACTORY_CLASS_NAME.public static SshProvider[] getAllProviders()
public static Capability[] getAllCapabilties()
Capability. This is determine by examining all
providers for their capabilities and producing a unique list.public static java.lang.String[] getAllCiphers()
public static java.lang.String[] getAllKEX()
public static java.lang.String[] getAllCompression()
public static java.lang.String[] getAllMAC()
public static SshProvider getProviderByName(java.lang.String providerName)
providerName - provider namejava.lang.IllegalArgumentException - if no such provider is foundpublic static java.lang.String[] getAllPublicKey()
public SshProvider getProvider()
public SshProvider getProvider(SshConfiguration configuration)
SshProviderFactorySshProvider using a specified configuration. Each
provider will be offered the configuration to see if it can support it.
If more than one provider can support the configuration, the actual one
used will depend on the factory implementation.getProvider in interface SshProviderFactoryconfiguration - configurationpublic static void setProviderClassLoader(java.lang.ClassLoader classLoader)
Thread.getContextClassLoader() if one is set, or the
class loader that loaded this class if not.classLoader - class loaderprotected static final SshProvider createProviderInstance(java.lang.String className) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionprotected static final java.lang.ClassLoader getClassLoader()
protected static final SshProvider loadFromProperties(java.net.URL resource) throws java.io.IOException
java.io.IOExceptionprotected static final SshProvider loadFromProperties(java.util.Properties properties)
protected static final java.util.Properties loadProperties(java.net.URL resource)
throws java.io.IOException
java.io.IOExceptionCopyright © 2018. All rights reserved.