Interface NamedFactory<T>
- Type Parameters:
T- The create object instance type
- All Superinterfaces:
Factory<T>, NamedResource, Supplier<T>
- All Known Subinterfaces:
BuiltinFactory<T>, CipherFactory, CompressionFactory, DigestFactory, MacFactory, RandomFactory, SignatureFactory
- All Known Implementing Classes:
AbstractRandomFactory, BouncyCastleRandomFactory, BuiltinCiphers, BuiltinCompressions, BuiltinDigests, BuiltinIoServiceFactoryFactories, BuiltinMacs, BuiltinSignatures, BuiltinUserAuthFactories, BuiltinUserAuthFactories, CompressionConfigValue, JceRandomFactory, KnownHostDigest, SingletonRandomFactory
A named factory is a factory identified by a name. Such names are used mainly in the algorithm negotiation at the
beginning of the SSH connection.
-
Field Summary
Fields inherited from interface NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> Tcreate(Collection<? extends NamedFactory<? extends T>> factories, String name) Create an instance of the specified name by looking up the needed factory in the list.static <E extends NamedResource & OptionalFeature>
List<E> setUpBuiltinFactories(boolean ignoreUnsupported, Collection<? extends E> preferred) static <S extends OptionalFeature, E extends NamedResource>
List<E> setUpTransformedFactories(boolean ignoreUnsupported, Collection<? extends S> preferred, Function<? super S, ? extends E> xform) Methods inherited from interface NamedResource
getName
-
Method Details
-
create
Create an instance of the specified name by looking up the needed factory in the list.- Type Parameters:
T- type of object to create- Parameters:
factories- list of available factoriesname- the factory name to use- Returns:
- a newly created object or
nullif the factory is not in the list
-
setUpTransformedFactories
static <S extends OptionalFeature, E extends NamedResource> List<E> setUpTransformedFactories(boolean ignoreUnsupported, Collection<? extends S> preferred, Function<? super S, ? extends E> xform) -
setUpBuiltinFactories
static <E extends NamedResource & OptionalFeature> List<E> setUpBuiltinFactories(boolean ignoreUnsupported, Collection<? extends E> preferred)
-