Class AbstractSecurityProviderRegistrar
- All Implemented Interfaces:
NamedResource,OptionalFeature,PropertyResolver,SecurityProviderChoice,SecurityProviderRegistrar
- Direct Known Subclasses:
BouncyCastleSecurityProviderRegistrar,EdDSASecurityProviderRegistrar
-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTORFields inherited from interface org.apache.sshd.common.OptionalFeature
FALSE, TRUEFields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTYFields inherited from interface org.apache.sshd.common.util.security.SecurityProviderChoice
EMPTYFields inherited from interface org.apache.sshd.common.util.security.SecurityProviderRegistrar
ALL_OPTIONS_VALUE, ALL_OPTIONS_WILDCARD, CONFIG_PROP_BASE, ENABLED_PROPERTY, NAMED_PROVIDER_PROPERTY, NO_OPTIONS_VALUE, SECURITY_ENTITIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ProvidercreateProviderInstance(String providerClassName) final StringgetName()protected ProvidergetOrCreateProvider(String providerClassName) Attempts to see if a provider with this name already registered.A map of properties that can be used to configure the SSH server or client.booleanisSecurityEntitySupported(Class<?> entityType, String name) toString()Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.OptionalFeature
isSupportedMethods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringProperty, isEmptyMethods inherited from interface org.apache.sshd.common.util.security.SecurityProviderChoice
getSecurityProviderMethods inherited from interface org.apache.sshd.common.util.security.SecurityProviderRegistrar
getBasePropertyName, getConfigurationPropertyName, getDefaultSecurityEntitySupportValue, getParentPropertyResolver, isCertificateFactorySupported, isCipherSupported, isEnabled, isKeyAgreementSupported, isKeyFactorySupported, isKeyPairGeneratorSupported, isMacSupported, isMessageDigestSupported, isNamedProviderUsed, isSignatureSupported
-
Field Details
-
props
-
supportedEntities
-
providerHolder
-
name
-
-
Constructor Details
-
AbstractSecurityProviderRegistrar
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNamedResource- Returns:
- The resource name
-
getProperties
Description copied from interface:PropertyResolverA map of properties that can be used to configure the SSH server or client. This map will never be changed by either the server or client and is not supposed to be changed at runtime (changes are not bound to have any effect on a running client or server), though it may affect the creation of sessions later as these values are usually not cached.
Note: the type of the mapped property should match the expected configuration value type -
Long, Integer, Boolean, String, etc.... If it doesn't, thetoString()result of the mapped value is used to convert it to the required type. E.g., if the mapped value is the string "1234" and the expected value is alongthen it will be parsed into one. Also, if the mapped value is anIntegerbut alongis expected, then it will be converted into one.- Specified by:
getPropertiesin interfacePropertyResolver- Specified by:
getPropertiesin interfaceSecurityProviderRegistrar- Returns:
- a valid
Mapcontaining configuration values, nevernull. Note: may be immutable.
-
isSecurityEntitySupported
- Specified by:
isSecurityEntitySupportedin interfaceSecurityProviderRegistrar
-
getOrCreateProvider
protected Provider getOrCreateProvider(String providerClassName) throws ReflectiveOperationException Attempts to see if a provider with this name already registered. If not, then uses reflection API in order to load and instantiate the specified providerClassName- Parameters:
providerClassName- The fully-qualified class name to instantiate if a provider not already registered- Returns:
- The resolved
Providerinstance - Note: the result is cached - i.e., successful resolution result will not cause the code to re-resolve the provider - Throws:
ReflectiveOperationException- If failed to instantiate the providerUnsupportedOperationException- If registrar not supported- See Also:
-
createProviderInstance
protected Provider createProviderInstance(String providerClassName) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-
toString
-