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
-
Constructor Summary
Constructors Constructor Description BaseBuilder()
-
Method Summary
-
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
-
DEFAULT_FILE_SYSTEM_FACTORY
public static final 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<BuiltinCiphers> DEFAULT_CIPHERS_PREFERENCE
The defaultBuiltinCiphers
setup in order of preference as specified by ssh_config(5)
-
DEFAULT_KEX_PREFERENCE
public static final List<BuiltinDHFactories> DEFAULT_KEX_PREFERENCE
The defaultBuiltinDHFactories
setup in order of preference as specified by ssh_config(5)
-
DEFAULT_MAC_PREFERENCE
public static final List<BuiltinMacs> DEFAULT_MAC_PREFERENCE
The defaultBuiltinMacs
setup in order of preference as specified by ssh_config(5)
-
DEFAULT_SIGNATURE_PREFERENCE
public static final List<BuiltinSignatures> DEFAULT_SIGNATURE_PREFERENCE
PreferredBuiltinSignatures
according to sshd_config(5) - HostKeyAlgorithmsHostKeyAlgorithms
recommendation
-
DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER
public static final UnknownChannelReferenceHandler DEFAULT_UNKNOWN_CHANNEL_REFERENCE_HANDLER
-
factory
protected Factory<T extends AbstractFactoryManager> factory
-
keyExchangeFactories
protected List<KeyExchangeFactory> keyExchangeFactories
-
cipherFactories
protected List<NamedFactory<Cipher>> cipherFactories
-
compressionFactories
protected List<NamedFactory<Compression>> compressionFactories
-
macFactories
protected List<NamedFactory<Mac>> macFactories
-
signatureFactories
protected List<NamedFactory<Signature>> signatureFactories
-
channelFactories
protected List<ChannelFactory> channelFactories
-
fileSystemFactory
protected 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
-
-
Method Detail
-
fillWithDefaultValues
protected S fillWithDefaultValues()
-
keyExchangeFactories
public S keyExchangeFactories(List<KeyExchangeFactory> keyExchangeFactories)
-
kexExtensionHandler
public S kexExtensionHandler(KexExtensionHandler kexExtensionHandler)
-
signatureFactories
public S signatureFactories(List<NamedFactory<Signature>> signatureFactories)
-
cipherFactories
public S cipherFactories(List<NamedFactory<Cipher>> cipherFactories)
-
compressionFactories
public S compressionFactories(List<NamedFactory<Compression>> compressionFactories)
-
macFactories
public S macFactories(List<NamedFactory<Mac>> macFactories)
-
channelFactories
public S channelFactories(List<ChannelFactory> channelFactories)
-
fileSystemFactory
public S fileSystemFactory(FileSystemFactory fileSystemFactory)
-
forwardingFilter
public S forwardingFilter(ForwardingFilter filter)
-
forwarderFactory
public S forwarderFactory(ForwarderFactory forwarderFactory)
-
globalRequestHandlers
public S globalRequestHandlers(List<RequestHandler<ConnectionService>> globalRequestHandlers)
-
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 interfaceObjectBuilder<T extends AbstractFactoryManager>
-
me
protected S me()
-
setUpDefaultCiphers
public static List<NamedFactory<Cipher>> setUpDefaultCiphers(boolean ignoreUnsupported)
- 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:
BuiltinCiphers.isSupported()
-
setUpDefaultMacs
public static List<NamedFactory<Mac>> setUpDefaultMacs(boolean ignoreUnsupported)
- 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:
BuiltinMacs.isSupported()
-
-