Package org.apache.sshd.common
Class BaseBuilder<T extends AbstractFactoryManager,S extends BaseBuilder<T,S>>
java.lang.Object
org.apache.sshd.common.BaseBuilder<T,S>
- Type Parameters:
T
- Type ofAbstractFactoryManager
being builtS
- Type of builder
- All Implemented Interfaces:
Supplier<T>
,ObjectBuilder<T>
- Direct Known Subclasses:
ClientBuilder
,ServerBuilder
public class BaseBuilder<T extends AbstractFactoryManager,S extends BaseBuilder<T,S>>
extends Object
implements ObjectBuilder<T>
Base class for dedicated client/server instance builders
- Author:
- Apache MINA SSHD Project
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<ChannelFactory>
protected ChannelStreamWriterResolver
protected List<NamedFactory<Cipher>>
protected List<NamedFactory<Compression>>
static final List<BuiltinCiphers>
The defaultBuiltinCiphers
setup in order of preference as specified by ssh_config(5)static final FileSystemFactory
static final ForwarderFactory
static final ForwardingFilter
static final List<BuiltinDHFactories>
The defaultBuiltinDHFactories
setup in order of preference as specified by ssh_config(5)static final List<BuiltinMacs>
The defaultBuiltinMacs
setup in order of preference as specified by ssh_config(5)static final List<BuiltinSignatures>
PreferredBuiltinSignatures
according to sshd_config(5) - HostKeyAlgorithmsHostKeyAlgorithms
recommendationstatic final UnknownChannelReferenceHandler
protected FileSystemFactory
protected ForwarderFactory
protected ForwardingFilter
protected List<RequestHandler<ConnectionService>>
protected KexExtensionHandler
protected List<KeyExchangeFactory>
protected List<NamedFactory<Mac>>
protected List<NamedFactory<Signature>>
protected UnknownChannelReferenceHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
build
(boolean isFillWithDefaultValues) channelFactories
(List<ChannelFactory> channelFactories) cipherFactories
(List<NamedFactory<Cipher>> cipherFactories) compressionFactories
(List<NamedFactory<Compression>> compressionFactories) fileSystemFactory
(FileSystemFactory fileSystemFactory) protected S
forwarderFactory
(ForwarderFactory forwarderFactory) forwardingFilter
(ForwardingFilter filter) globalRequestHandlers
(List<RequestHandler<ConnectionService>> globalRequestHandlers) kexExtensionHandler
(KexExtensionHandler kexExtensionHandler) keyExchangeFactories
(List<KeyExchangeFactory> keyExchangeFactories) macFactories
(List<NamedFactory<Mac>> macFactories) protected S
me()
randomFactory
(Factory<Random> randomFactory) static List<NamedFactory<Cipher>>
setUpDefaultCiphers
(boolean ignoreUnsupported) static List<NamedFactory<Mac>>
setUpDefaultMacs
(boolean ignoreUnsupported) signatureFactories
(List<NamedFactory<Signature>> signatureFactories) 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 Details
-
DEFAULT_FILE_SYSTEM_FACTORY
-
DEFAULT_FORWARDING_FILTER
-
DEFAULT_FORWARDER_FACTORY
-
DEFAULT_CIPHERS_PREFERENCE
The defaultBuiltinCiphers
setup in order of preference as specified by ssh_config(5) -
DEFAULT_KEX_PREFERENCE
The defaultBuiltinDHFactories
setup in order of preference as specified by ssh_config(5) -
DEFAULT_MAC_PREFERENCE
The defaultBuiltinMacs
setup in order of preference as specified by ssh_config(5) -
DEFAULT_SIGNATURE_PREFERENCE
PreferredBuiltinSignatures
according to sshd_config(5) - HostKeyAlgorithmsHostKeyAlgorithms
recommendation -
DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER
-
factory
-
keyExchangeFactories
-
cipherFactories
-
compressionFactories
-
macFactories
-
signatureFactories
-
randomFactory
-
channelFactories
-
fileSystemFactory
-
forwarderFactory
-
globalRequestHandlers
-
forwardingFilter
-
channelStreamPacketWriterResolver
-
unknownChannelReferenceHandler
-
kexExtensionHandler
-
-
Constructor Details
-
BaseBuilder
public BaseBuilder()
-
-
Method Details
-
fillWithDefaultValues
-
keyExchangeFactories
-
kexExtensionHandler
-
signatureFactories
-
randomFactory
-
cipherFactories
-
compressionFactories
-
macFactories
-
channelFactories
-
fileSystemFactory
-
forwardingFilter
-
forwarderFactory
-
globalRequestHandlers
-
factory
-
channelStreamPacketWriterResolver
-
unknownChannelReferenceHandler
-
build
-
build
- Specified by:
build
in interfaceObjectBuilder<T extends AbstractFactoryManager>
-
me
-
setUpDefaultCiphers
- Parameters:
ignoreUnsupported
- Iftrue
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:
- A
List
of the defaultNamedFactory
instances of theCipher
s according to the preference order defined byDEFAULT_CIPHERS_PREFERENCE
. Note: the list may be filtered to exclude unsupported JCE ciphers according to the ignoreUnsupported parameter - See Also:
-
setUpDefaultMacs
- Parameters:
ignoreUnsupported
- Iftrue
all the available built-inMac
factories are added, otherwise only those that are supported by the current JDK setup- Returns:
- A
List
of the defaultNamedFactory
instances of theMac
s according to the preference order defined byDEFAULT_MAC_PREFERENCE
. Note: the list may be filtered to exclude unsupported JCE MACs according to the ignoreUnsupported parameter - See Also:
-