Package org.apache.sshd.client
Class ClientBuilder
- java.lang.Object
-
- org.apache.sshd.common.BaseBuilder<SshClient,ClientBuilder>
-
- org.apache.sshd.client.ClientBuilder
-
- All Implemented Interfaces:
Supplier<SshClient>,ObjectBuilder<SshClient>
public class ClientBuilder extends BaseBuilder<SshClient,ClientBuilder>
SshClient builder
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientIdentityLoaderclientIdentityLoaderstatic List<ChannelFactory>DEFAULT_CHANNEL_FACTORIESstatic ClientIdentityLoaderDEFAULT_CLIENT_IDENTITY_LOADERstatic List<CompressionFactory>DEFAULT_COMPRESSION_FACTORIESstatic FilePasswordProviderDEFAULT_FILE_PASSWORD_PROVIDERstatic List<RequestHandler<ConnectionService>>DEFAULT_GLOBAL_REQUEST_HANDLERSstatic HostConfigEntryResolverDEFAULT_HOST_CONFIG_ENTRY_RESOLVERstatic KexExtensionHandlerDEFAULT_KEX_EXTENSION_HANDLERstatic ServerKeyVerifierDEFAULT_SERVER_KEY_VERIFIERstatic Function<DHFactory,KeyExchangeFactory>DH2KEXprotected FilePasswordProviderfilePasswordProviderprotected HostConfigEntryResolverhostConfigEntryResolverprotected ServerKeyVerifierserverKeyVerifier-
Fields inherited from class org.apache.sshd.common.BaseBuilder
channelFactories, channelStreamPacketWriterResolver, cipherFactories, compressionFactories, DEFAULT_CIPHERS_PREFERENCE, DEFAULT_FILE_SYSTEM_FACTORY, DEFAULT_FORWARDER_FACTORY, DEFAULT_FORWARDING_FILTER, DEFAULT_KEX_PREFERENCE, DEFAULT_MAC_PREFERENCE, DEFAULT_SIGNATURE_PREFERENCE, DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER, factory, fileSystemFactory, forwarderFactory, forwardingFilter, globalRequestHandlers, kexExtensionHandler, keyExchangeFactories, macFactories, randomFactory, signatureFactories, unknownChannelReferenceHandler
-
-
Constructor Summary
Constructors Constructor Description ClientBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SshClientbuild(boolean isFillWithDefaultValues)static ClientBuilderbuilder()ClientBuilderclientIdentityLoader(ClientIdentityLoader loader)ClientBuilderfilePasswordProvider(FilePasswordProvider provider)protected ClientBuilderfillWithDefaultValues()ClientBuilderhostConfigEntryResolver(HostConfigEntryResolver resolver)ClientBuilderserverKeyVerifier(ServerKeyVerifier serverKeyVerifier)static List<NamedFactory<Compression>>setUpDefaultCompressionFactories(boolean ignoreUnsupported)static List<KeyExchangeFactory>setUpDefaultKeyExchanges(boolean ignoreUnsupported)static List<NamedFactory<Signature>>setUpDefaultSignatureFactories(boolean ignoreUnsupported)-
Methods inherited from class org.apache.sshd.common.BaseBuilder
build, channelFactories, channelStreamPacketWriterResolver, cipherFactories, compressionFactories, factory, fileSystemFactory, forwarderFactory, forwardingFilter, globalRequestHandlers, kexExtensionHandler, keyExchangeFactories, macFactories, me, randomFactory, setUpDefaultCiphers, setUpDefaultMacs, signatureFactories, unknownChannelReferenceHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.util.ObjectBuilder
get
-
-
-
-
Field Detail
-
DH2KEX
public static final Function<DHFactory,KeyExchangeFactory> DH2KEX
-
DEFAULT_COMPRESSION_FACTORIES
public static final List<CompressionFactory> DEFAULT_COMPRESSION_FACTORIES
-
DEFAULT_CHANNEL_FACTORIES
public static final List<ChannelFactory> DEFAULT_CHANNEL_FACTORIES
-
DEFAULT_GLOBAL_REQUEST_HANDLERS
public static final List<RequestHandler<ConnectionService>> DEFAULT_GLOBAL_REQUEST_HANDLERS
-
DEFAULT_SERVER_KEY_VERIFIER
public static final ServerKeyVerifier DEFAULT_SERVER_KEY_VERIFIER
-
DEFAULT_HOST_CONFIG_ENTRY_RESOLVER
public static final HostConfigEntryResolver DEFAULT_HOST_CONFIG_ENTRY_RESOLVER
-
DEFAULT_CLIENT_IDENTITY_LOADER
public static final ClientIdentityLoader DEFAULT_CLIENT_IDENTITY_LOADER
-
DEFAULT_FILE_PASSWORD_PROVIDER
public static final FilePasswordProvider DEFAULT_FILE_PASSWORD_PROVIDER
-
DEFAULT_KEX_EXTENSION_HANDLER
public static final KexExtensionHandler DEFAULT_KEX_EXTENSION_HANDLER
-
serverKeyVerifier
protected ServerKeyVerifier serverKeyVerifier
-
hostConfigEntryResolver
protected HostConfigEntryResolver hostConfigEntryResolver
-
clientIdentityLoader
protected ClientIdentityLoader clientIdentityLoader
-
filePasswordProvider
protected FilePasswordProvider filePasswordProvider
-
-
Method Detail
-
serverKeyVerifier
public ClientBuilder serverKeyVerifier(ServerKeyVerifier serverKeyVerifier)
-
hostConfigEntryResolver
public ClientBuilder hostConfigEntryResolver(HostConfigEntryResolver resolver)
-
clientIdentityLoader
public ClientBuilder clientIdentityLoader(ClientIdentityLoader loader)
-
filePasswordProvider
public ClientBuilder filePasswordProvider(FilePasswordProvider provider)
-
fillWithDefaultValues
protected ClientBuilder fillWithDefaultValues()
- Overrides:
fillWithDefaultValuesin classBaseBuilder<SshClient,ClientBuilder>
-
build
public SshClient build(boolean isFillWithDefaultValues)
- Overrides:
buildin classBaseBuilder<SshClient,ClientBuilder>
-
setUpDefaultSignatureFactories
public static List<NamedFactory<Signature>> setUpDefaultSignatureFactories(boolean ignoreUnsupported)
-
setUpDefaultCompressionFactories
public static List<NamedFactory<Compression>> setUpDefaultCompressionFactories(boolean ignoreUnsupported)
-
setUpDefaultKeyExchanges
public static List<KeyExchangeFactory> setUpDefaultKeyExchanges(boolean ignoreUnsupported)
- Parameters:
ignoreUnsupported- Iftruethen all the default key exchanges are included, regardless of whether they are currently supported by the JCE. Otherwise, only the supported ones out of the list are included- Returns:
- A
Listof the defaultNamedFactoryinstances of theKeyExchanges according to the preference order defined byBaseBuilder.DEFAULT_KEX_PREFERENCE. Note: the list may be filtered to exclude unsupported JCE key exchanges according to the ignoreUnsupported parameter - See Also:
BuiltinDHFactories.isSupported()
-
builder
public static ClientBuilder builder()
-
-