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 ofAbstractFactoryManagerbeing 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ChannelFactory> protected ChannelStreamWriterResolverprotected List<NamedFactory<Cipher>> protected List<NamedFactory<Compression>> static final List<BuiltinCiphers> The defaultBuiltinCipherssetup in order of preference as specified by ssh_config(5)static final FileSystemFactorystatic final ForwarderFactorystatic final ForwardingFilterstatic final List<BuiltinDHFactories> The defaultBuiltinDHFactoriessetup in order of preference as specified by ssh_config(5)static final List<BuiltinMacs> The defaultBuiltinMacssetup in order of preference as specified by ssh_config(5)static final List<BuiltinSignatures> PreferredBuiltinSignaturesaccording to sshd_config(5) - HostKeyAlgorithmsHostKeyAlgorithmsrecommendationstatic final UnknownChannelReferenceHandlerprotected FileSystemFactoryprotected ForwarderFactoryprotected ForwardingFilterprotected List<RequestHandler<ConnectionService>> protected KexExtensionHandlerprotected List<KeyExchangeFactory> protected List<NamedFactory<Mac>> protected List<NamedFactory<Signature>> protected UnknownChannelReferenceHandler -
Constructor Summary
Constructors -
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 SforwarderFactory(ForwarderFactory forwarderFactory) forwardingFilter(ForwardingFilter filter) globalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers) kexExtensionHandler(KexExtensionHandler kexExtensionHandler) keyExchangeFactories(List<KeyExchangeFactory> keyExchangeFactories) macFactories(List<NamedFactory<Mac>> macFactories) protected Sme()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, waitMethods 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 defaultBuiltinCipherssetup in order of preference as specified by ssh_config(5) -
DEFAULT_KEX_PREFERENCE
The defaultBuiltinDHFactoriessetup in order of preference as specified by ssh_config(5) -
DEFAULT_MAC_PREFERENCE
The defaultBuiltinMacssetup in order of preference as specified by ssh_config(5) -
DEFAULT_SIGNATURE_PREFERENCE
PreferredBuiltinSignaturesaccording to sshd_config(5) - HostKeyAlgorithmsHostKeyAlgorithmsrecommendation -
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:
buildin interfaceObjectBuilder<T extends AbstractFactoryManager>
-
me
-
setUpDefaultCiphers
- Parameters:
ignoreUnsupported- Iftruethen 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
Listof the defaultNamedFactoryinstances of theCiphers 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- Iftrueall the available built-inMacfactories are added, otherwise only those that are supported by the current JDK setup- Returns:
- A
Listof the defaultNamedFactoryinstances of theMacs 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:
-