Package net.schmizz.sshj
Interface Config
-
- All Known Implementing Classes:
AndroidConfig,ConfigImpl,DefaultConfig
public interface ConfigHolds configuration information and factories. Acts a container for factories ofKeyExchange,Cipher,Compression,MAC,Signature,Random, andFileKeyProvider.
-
-
Method Summary
Modifier and Type Method Description java.util.List<Factory.Named<Cipher>>getCipherFactories()Retrieve the list of named factories forCipher.java.util.List<Factory.Named<Compression>>getCompressionFactories()Retrieve the list of named factories forCompression.java.util.List<Factory.Named<FileKeyProvider>>getFileKeyProviderFactories()Retrieve the list of named factories forFileKeyProvider.KeepAliveProvidergetKeepAliveProvider()java.util.List<Factory.Named<KeyExchange>>getKeyExchangeFactories()Retrieve the list of named factories forKeyExchange.LoggerFactorygetLoggerFactory()java.util.List<Factory.Named<MAC>>getMACFactories()Retrieve the list of named factories forMAC.Factory<Random>getRandomFactory()Retrieve theRandomfactory.java.util.List<Factory.Named<Signature>>getSignatureFactories()Retrieve the list of named factories forSignaturejava.lang.StringgetVersion()Returns the software version information for identification during SSH connection initialization.booleanisWaitForServerIdentBeforeSendingClientIdent()Gets whether the client should first wait for a received server ident, before sending the client ident.voidsetCipherFactories(java.util.List<Factory.Named<Cipher>> cipherFactories)Set the named factories forCipher.voidsetCompressionFactories(java.util.List<Factory.Named<Compression>> compressionFactories)Set the named factories forCompression.voidsetFileKeyProviderFactories(java.util.List<Factory.Named<FileKeyProvider>> fileKeyProviderFactories)Set the named factories forFileKeyProvider.voidsetKeepAliveProvider(KeepAliveProvider keepAliveProvider)Set the provider that provides the keep-alive implementation.voidsetKeyExchangeFactories(java.util.List<Factory.Named<KeyExchange>> kexFactories)Set the named factories forKeyExchange.voidsetLoggerFactory(LoggerFactory loggerFactory)Sets the LoggerFactory to use.voidsetMACFactories(java.util.List<Factory.Named<MAC>> macFactories)Set the named factories forMAC.voidsetRandomFactory(Factory<Random> randomFactory)Set the factory forRandom.voidsetSignatureFactories(java.util.List<Factory.Named<Signature>> signatureFactories)Set the named factories forSignature.voidsetVersion(java.lang.String version)Set the software version information for identification during SSH connection initialization.voidsetWaitForServerIdentBeforeSendingClientIdent(boolean waitForServerIdentBeforeSendingClientIdent)Sets whether the SSH client should wait for a received server ident, before sending the client ident.
-
-
-
Method Detail
-
getCipherFactories
java.util.List<Factory.Named<Cipher>> getCipherFactories()
Retrieve the list of named factories forCipher.- Returns:
- a list of named
Cipherfactories
-
getCompressionFactories
java.util.List<Factory.Named<Compression>> getCompressionFactories()
Retrieve the list of named factories forCompression.- Returns:
- a list of named
Compressionfactories
-
getFileKeyProviderFactories
java.util.List<Factory.Named<FileKeyProvider>> getFileKeyProviderFactories()
Retrieve the list of named factories forFileKeyProvider.- Returns:
- a list of named
FileKeyProviderfactories
-
getKeyExchangeFactories
java.util.List<Factory.Named<KeyExchange>> getKeyExchangeFactories()
Retrieve the list of named factories forKeyExchange.- Returns:
- a list of named
KeyExchangefactories
-
getMACFactories
java.util.List<Factory.Named<MAC>> getMACFactories()
Retrieve the list of named factories forMAC.- Returns:
- a list of named
MACfactories
-
getRandomFactory
Factory<Random> getRandomFactory()
Retrieve theRandomfactory.- Returns:
- the
Randomfactory
-
getSignatureFactories
java.util.List<Factory.Named<Signature>> getSignatureFactories()
Retrieve the list of named factories forSignature- Returns:
- a list of named
Signaturefactories
-
getVersion
java.lang.String getVersion()
Returns the software version information for identification during SSH connection initialization. For example,"NET_3_0".
-
setCipherFactories
void setCipherFactories(java.util.List<Factory.Named<Cipher>> cipherFactories)
Set the named factories forCipher.- Parameters:
cipherFactories- a list of named factories
-
setCompressionFactories
void setCompressionFactories(java.util.List<Factory.Named<Compression>> compressionFactories)
Set the named factories forCompression.- Parameters:
compressionFactories- a list of named factories
-
setFileKeyProviderFactories
void setFileKeyProviderFactories(java.util.List<Factory.Named<FileKeyProvider>> fileKeyProviderFactories)
Set the named factories forFileKeyProvider.- Parameters:
fileKeyProviderFactories- a list of named factories
-
setKeyExchangeFactories
void setKeyExchangeFactories(java.util.List<Factory.Named<KeyExchange>> kexFactories)
Set the named factories forKeyExchange.- Parameters:
kexFactories- a list of named factories
-
setMACFactories
void setMACFactories(java.util.List<Factory.Named<MAC>> macFactories)
Set the named factories forMAC.- Parameters:
macFactories- a list of named factories
-
setRandomFactory
void setRandomFactory(Factory<Random> randomFactory)
Set the factory forRandom.- Parameters:
randomFactory- the factory
-
setSignatureFactories
void setSignatureFactories(java.util.List<Factory.Named<Signature>> signatureFactories)
Set the named factories forSignature.- Parameters:
signatureFactories- a list of named factories
-
setVersion
void setVersion(java.lang.String version)
Set the software version information for identification during SSH connection initialization. For example,"SSHJ_0_1".- Parameters:
version- software version info
-
getKeepAliveProvider
KeepAliveProvider getKeepAliveProvider()
- Returns:
- The provider that creates the keep-alive implementation of choice.
-
setKeepAliveProvider
void setKeepAliveProvider(KeepAliveProvider keepAliveProvider)
Set the provider that provides the keep-alive implementation.- Parameters:
keepAliveProvider- keep-alive provider
-
isWaitForServerIdentBeforeSendingClientIdent
boolean isWaitForServerIdentBeforeSendingClientIdent()
Gets whether the client should first wait for a received server ident, before sending the client ident. NB: This is non-standard behaviour, and can potentially deadlock if the server also waits on the client ident. The default value is set to false.- Returns:
- Whether to first wait for the server ident.
-
setWaitForServerIdentBeforeSendingClientIdent
void setWaitForServerIdentBeforeSendingClientIdent(boolean waitForServerIdentBeforeSendingClientIdent)
Sets whether the SSH client should wait for a received server ident, before sending the client ident. NB: This is non-standard behaviour, and can potentially deadlock if the server also waits on the client ident.- Parameters:
waitForServerIdentBeforeSendingClientIdent- Whether to wait for the server ident.
-
setLoggerFactory
void setLoggerFactory(LoggerFactory loggerFactory)
Sets the LoggerFactory to use.
-
getLoggerFactory
LoggerFactory getLoggerFactory()
- Returns:
- The LoggerFactory the SSHClient will use.
-
-