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

java.lang.Object
org.apache.sshd.common.BaseBuilder<T,S>
Type Parameters:
T - Type of AbstractFactoryManager being built
S - Type of builder
All Implemented Interfaces:
Supplier<T>, org.apache.sshd.common.util.ObjectBuilder<T>
Direct Known Subclasses:
ClientBuilder, ServerBuilder

public class BaseBuilder<T extends AbstractFactoryManager, S extends BaseBuilder<T,S>> extends Object implements org.apache.sshd.common.util.ObjectBuilder<T>
Base class for dedicated client/server instance builders
Author:
Apache MINA SSHD Project
  • Field Details

    • DEFAULT_FILE_SYSTEM_FACTORY

      public static final org.apache.sshd.common.file.FileSystemFactory DEFAULT_FILE_SYSTEM_FACTORY
    • DEFAULT_FORWARDING_FILTER

      public static final ForwardingFilter DEFAULT_FORWARDING_FILTER
    • DEFAULT_FORWARDER_FACTORY

      public static final ForwarderFactory DEFAULT_FORWARDER_FACTORY
    • DEFAULT_CIPHERS_PREFERENCE

      public static final List<org.apache.sshd.common.cipher.BuiltinCiphers> DEFAULT_CIPHERS_PREFERENCE
      The default BuiltinCiphers setup in order of preference as specified by ssh_config(5)
    • DEFAULT_KEX_PREFERENCE

      public static final List<BuiltinDHFactories> DEFAULT_KEX_PREFERENCE
      The default BuiltinDHFactories setup in order of preference as specified by ssh_config(5)
    • DEFAULT_MAC_PREFERENCE

      public static final List<org.apache.sshd.common.mac.BuiltinMacs> DEFAULT_MAC_PREFERENCE
      The default BuiltinMacs setup in order of preference as specified by ssh_config(5)
    • DEFAULT_SIGNATURE_PREFERENCE

      public static final List<org.apache.sshd.common.signature.BuiltinSignatures> DEFAULT_SIGNATURE_PREFERENCE
      Preferred BuiltinSignatures according to sshd_config(5) - HostKeyAlgorithms HostKeyAlgorithms recommendation
    • DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER

      public static final UnknownChannelReferenceHandler DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER
    • factory

      protected org.apache.sshd.common.Factory<T extends AbstractFactoryManager> factory
    • keyExchangeFactories

      protected List<KeyExchangeFactory> keyExchangeFactories
    • cipherFactories

      protected List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> cipherFactories
    • compressionFactories

      protected List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressionFactories
    • macFactories

      protected List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macFactories
    • signatureFactories

      protected List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.signature.Signature>> signatureFactories
    • randomFactory

      protected org.apache.sshd.common.Factory<org.apache.sshd.common.random.Random> randomFactory
    • channelFactories

      protected List<ChannelFactory> channelFactories
    • fileSystemFactory

      protected org.apache.sshd.common.file.FileSystemFactory fileSystemFactory
    • forwarderFactory

      protected ForwarderFactory forwarderFactory
    • globalRequestHandlers

      protected List<RequestHandler<ConnectionService>> globalRequestHandlers
    • forwardingFilter

      protected ForwardingFilter forwardingFilter
    • channelStreamPacketWriterResolver

      protected ChannelStreamWriterResolver channelStreamPacketWriterResolver
    • unknownChannelReferenceHandler

      protected UnknownChannelReferenceHandler unknownChannelReferenceHandler
    • kexExtensionHandler

      protected KexExtensionHandler kexExtensionHandler
  • Constructor Details

    • BaseBuilder

      public BaseBuilder()
  • Method Details

    • fillWithDefaultValues

      protected S fillWithDefaultValues()
    • keyExchangeFactories

      public S keyExchangeFactories(List<KeyExchangeFactory> keyExchangeFactories)
    • kexExtensionHandler

      public S kexExtensionHandler(KexExtensionHandler kexExtensionHandler)
    • signatureFactories

      public S signatureFactories(List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.signature.Signature>> signatureFactories)
    • randomFactory

      public S randomFactory(org.apache.sshd.common.Factory<org.apache.sshd.common.random.Random> randomFactory)
    • cipherFactories

      public S cipherFactories(List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> cipherFactories)
    • compressionFactories

      public S compressionFactories(List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressionFactories)
    • macFactories

      public S macFactories(List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macFactories)
    • channelFactories

      public S channelFactories(List<ChannelFactory> channelFactories)
    • fileSystemFactory

      public S fileSystemFactory(org.apache.sshd.common.file.FileSystemFactory fileSystemFactory)
    • forwardingFilter

      public S forwardingFilter(ForwardingFilter filter)
    • forwarderFactory

      public S forwarderFactory(ForwarderFactory forwarderFactory)
    • globalRequestHandlers

      public S globalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers)
    • factory

      public S factory(org.apache.sshd.common.Factory<T> factory)
    • channelStreamPacketWriterResolver

      public S channelStreamPacketWriterResolver(ChannelStreamWriterResolver resolver)
    • unknownChannelReferenceHandler

      public S unknownChannelReferenceHandler(UnknownChannelReferenceHandler handler)
    • build

      public T build(boolean isFillWithDefaultValues)
    • build

      public T build()
      Specified by:
      build in interface org.apache.sshd.common.util.ObjectBuilder<T extends AbstractFactoryManager>
    • me

      protected S me()
    • setUpDefaultCiphers

      public static List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> setUpDefaultCiphers(boolean ignoreUnsupported)
      Parameters:
      ignoreUnsupported - 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:
      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
      See Also:
      • BuiltinCiphers.isSupported()
    • setUpDefaultMacs

      public static List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> setUpDefaultMacs(boolean ignoreUnsupported)
      Parameters:
      ignoreUnsupported - If true all the available built-in Mac factories are added, otherwise only those that are supported by the current JDK setup
      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
      See Also:
      • BuiltinMacs.isSupported()