Top Description Fields Constructors Methods
org.apache.sshd.common

public Class BaseBuilder<T extends AbstractFactoryManager, S extends BaseBuilder<T, S>>

extends Object
implements ObjectBuilder<T extends AbstractFactoryManager>
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.util.ObjectBuilder, java.util.function.Supplier
Known Direct Subclasses
org.apache.sshd.server.ServerBuilder, org.apache.sshd.client.ClientBuilder
Type Parameters
<T>
Type of AbstractFactoryManager being built
<S>
Type of builder
Imports
java.util.Arrays, .Collections, .List, org.apache.sshd.common.channel.ChannelFactory, .RequestHandler, org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver, org.apache.sshd.common.cipher.BuiltinCiphers, .Cipher, org.apache.sshd.common.compression.Compression, org.apache.sshd.common.file.FileSystemFactory, org.apache.sshd.common.file.nativefs.NativeFileSystemFactory, org.apache.sshd.common.forward.DefaultForwarderFactory, .ForwarderFactory, org.apache.sshd.common.helpers.AbstractFactoryManager, org.apache.sshd.common.kex.BuiltinDHFactories, .KeyExchangeFactory, org.apache.sshd.common.kex.extension.KexExtensionHandler, org.apache.sshd.common.mac.BuiltinMacs, .Mac, org.apache.sshd.common.random.Random, .SingletonRandomFactory, org.apache.sshd.common.session.ConnectionService, .UnknownChannelReferenceHandler, org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler, org.apache.sshd.common.signature.BuiltinSignatures, .Signature, org.apache.sshd.common.util.ObjectBuilder, org.apache.sshd.common.util.security.SecurityUtils, org.apache.sshd.server.forward.ForwardingFilter, .RejectAllForwardingFilter

Base class for dedicated client/server instance builders
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
protected List<ChannelFactory>
protected ChannelStreamWriterResolver
protected List<NamedFactory<Cipher>>
protected List<NamedFactory<Compression>>
public static final List<BuiltinCiphers>
DEFAULT_CIPHERS_PREFERENCE

The default BuiltinCiphers setup in order of preference as specified by ssh_config(5)

public static final FileSystemFactory
public static final ForwarderFactory
public static final ForwardingFilter
public static final List<BuiltinDHFactories>
DEFAULT_KEX_PREFERENCE

The default BuiltinDHFactories setup in order of preference as specified by ssh_config(5)

public static final List<BuiltinMacs>
DEFAULT_MAC_PREFERENCE

The default BuiltinMacs setup in order of preference as specified by ssh_config(5)

public static final List<BuiltinSignatures>
DEFAULT_SIGNATURE_PREFERENCE

Preferred BuiltinSignatures according to sshd_config(5) - HostKeyAlgorithms HostKeyAlgorithms recommendation

public static final UnknownChannelReferenceHandler
protected Factory<T>
protected FileSystemFactory
protected ForwarderFactory
protected ForwardingFilter
protected List<RequestHandler<ConnectionService>>
protected KexExtensionHandler
protected List<KeyExchangeFactory>
protected List<NamedFactory<Mac>>
protected Factory<Random>
protected List<NamedFactory<Signature>>
protected UnknownChannelReferenceHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public T
build(boolean isFillWithDefaultValues)

public T
public S
public S
public S
public S
public S
factory(Factory<T> factory)

public S
protected S
public S
public S
public S
public S
public S
public S
protected S
me()

public S
randomFactory(Factory<Random> randomFactory)

public static List<NamedFactory<Cipher>>

Returns:

A List of the default NamedFactory instances of the Ciphers according to the preference order defined by DEFAULT_CIPHERS_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE ciphers according to the ignoreUnsupported parameter

setUpDefaultCiphers
(boolean
If true then all the default ciphers are included, regardless of whether they are currently supported by the JCE. Otherwise, only the supported ones out of the list are included
ignoreUnsupported
)

public static List<NamedFactory<Mac>>

Returns:

A List of the default NamedFactory instances of the Macs according to the preference order defined by DEFAULT_MAC_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE MACs according to the ignoreUnsupported parameter

setUpDefaultMacs
(boolean
If true all the available built-in Mac factories are added, otherwise only those that are supported by the current JDK setup
ignoreUnsupported
)

public S
public S
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelFactoriesback to summary
protected List<ChannelFactory> channelFactories
channelStreamPacketWriterResolverback to summary
protected ChannelStreamWriterResolver channelStreamPacketWriterResolver
cipherFactoriesback to summary
protected List<NamedFactory<Cipher>> cipherFactories
compressionFactoriesback to summary
protected List<NamedFactory<Compression>> compressionFactories
DEFAULT_CIPHERS_PREFERENCEback to summary
public static final List<BuiltinCiphers> DEFAULT_CIPHERS_PREFERENCE

The default BuiltinCiphers setup in order of preference as specified by ssh_config(5)

DEFAULT_FILE_SYSTEM_FACTORYback to summary
public static final FileSystemFactory DEFAULT_FILE_SYSTEM_FACTORY
DEFAULT_FORWARDER_FACTORYback to summary
public static final ForwarderFactory DEFAULT_FORWARDER_FACTORY
DEFAULT_FORWARDING_FILTERback to summary
public static final ForwardingFilter DEFAULT_FORWARDING_FILTER
DEFAULT_KEX_PREFERENCEback to summary
public static final List<BuiltinDHFactories> DEFAULT_KEX_PREFERENCE

The default BuiltinDHFactories setup in order of preference as specified by ssh_config(5)

DEFAULT_MAC_PREFERENCEback to summary
public static final List<BuiltinMacs> DEFAULT_MAC_PREFERENCE

The default BuiltinMacs setup in order of preference as specified by ssh_config(5)

DEFAULT_SIGNATURE_PREFERENCEback to summary
public static final List<BuiltinSignatures> DEFAULT_SIGNATURE_PREFERENCE

Preferred BuiltinSignatures according to sshd_config(5) - HostKeyAlgorithms HostKeyAlgorithms recommendation

DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLERback to summary
public static final UnknownChannelReferenceHandler DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER
factoryback to summary
protected Factory<T> factory
fileSystemFactoryback to summary
protected FileSystemFactory fileSystemFactory
forwarderFactoryback to summary
protected ForwarderFactory forwarderFactory
forwardingFilterback to summary
protected ForwardingFilter forwardingFilter
globalRequestHandlersback to summary
protected List<RequestHandler<ConnectionService>> globalRequestHandlers
kexExtensionHandlerback to summary
protected KexExtensionHandler kexExtensionHandler
keyExchangeFactoriesback to summary
protected List<KeyExchangeFactory> keyExchangeFactories
macFactoriesback to summary
protected List<NamedFactory<Mac>> macFactories
randomFactoryback to summary
protected Factory<Random> randomFactory
signatureFactoriesback to summary
protected List<NamedFactory<Signature>> signatureFactories
unknownChannelReferenceHandlerback to summary
protected UnknownChannelReferenceHandler unknownChannelReferenceHandler

Constructor Detail

BaseBuilderback to summary
public BaseBuilder()

Method Detail

buildback to summary
public T build(boolean isFillWithDefaultValues)
buildback to summary
public T build()

Implements org.apache.sshd.common.util.ObjectBuilder.build.

Annotations
@Override
channelFactoriesback to summary
public S channelFactories(List<ChannelFactory> channelFactories)
channelStreamPacketWriterResolverback to summary
public S channelStreamPacketWriterResolver(ChannelStreamWriterResolver resolver)
cipherFactoriesback to summary
public S cipherFactories(List<NamedFactory<Cipher>> cipherFactories)
compressionFactoriesback to summary
public S compressionFactories(List<NamedFactory<Compression>> compressionFactories)
factoryback to summary
public S factory(Factory<T> factory)
fileSystemFactoryback to summary
public S fileSystemFactory(FileSystemFactory fileSystemFactory)
fillWithDefaultValuesback to summary
protected S fillWithDefaultValues()
forwarderFactoryback to summary
public S forwarderFactory(ForwarderFactory forwarderFactory)
forwardingFilterback to summary
public S forwardingFilter(ForwardingFilter filter)
globalRequestHandlersback to summary
public S globalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers)
kexExtensionHandlerback to summary
public S kexExtensionHandler(KexExtensionHandler kexExtensionHandler)
keyExchangeFactoriesback to summary
public S keyExchangeFactories(List<KeyExchangeFactory> keyExchangeFactories)
macFactoriesback to summary
public S macFactories(List<NamedFactory<Mac>> macFactories)
meback to summary
protected S me()
Annotations
@SuppressWarnings:unchecked
randomFactoryback to summary
public S randomFactory(Factory<Random> randomFactory)
setUpDefaultCiphersback to summary
public static List<NamedFactory<Cipher>> setUpDefaultCiphers(boolean ignoreUnsupported)
Parameters
ignoreUnsupported:boolean

If true then all the default ciphers are included, regardless of whether they are currently supported by the JCE. Otherwise, only the supported ones out of the list are included

Returns:List<NamedFactory<Cipher>>

A List of the default NamedFactory instances of the Ciphers according to the preference order defined by DEFAULT_CIPHERS_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE ciphers according to the ignoreUnsupported parameter

Annotations
@SuppressWarnings:unchecked, rawtypes
See Also
BuiltinCiphers#isSupported()
setUpDefaultMacsback to summary
public static List<NamedFactory<Mac>> setUpDefaultMacs(boolean ignoreUnsupported)
Parameters
ignoreUnsupported:boolean

If true all the available built-in Mac factories are added, otherwise only those that are supported by the current JDK setup

Returns:List<NamedFactory<Mac>>

A List of the default NamedFactory instances of the Macs according to the preference order defined by DEFAULT_MAC_PREFERENCE

Note

the list may be filtered to exclude unsupported JCE MACs according to the ignoreUnsupported parameter

Annotations
@SuppressWarnings:unchecked, rawtypes
See Also
BuiltinMacs#isSupported()
signatureFactoriesback to summary
public S signatureFactories(List<NamedFactory<Signature>> signatureFactories)
unknownChannelReferenceHandlerback to summary
public S unknownChannelReferenceHandler(UnknownChannelReferenceHandler handler)