Top Fields Constructors Methods
org.apache.sshd.common.util.security

public abstract Class AbstractSecurityProviderRegistrar

extends AbstractLoggingBean
implements SecurityProviderRegistrar
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.util.security.SecurityProviderRegistrar, org.apache.sshd.common.PropertyResolver, org.apache.sshd.common.OptionalFeature, org.apache.sshd.common.util.security.SecurityProviderChoice, org.apache.sshd.common.NamedResource
Known Direct Subclasses
org.apache.sshd.common.util.security.SunJCESecurityProviderRegistrar, org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar, org.apache.sshd.common.util.security.eddsa.EdDSASecurityProviderRegistrar
Imports
java.security.Provider, .Security, java.util.HashMap, .Map, .TreeMap, java.util.concurrent.atomic.AtomicReference, org.apache.sshd.common.util.ValidateUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final String
protected final Map<String, Object>
protected final AtomicReference<Provider>
protected final Map<Class<?>, Map<String, Boolean>>
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected Provider
createProviderInstance(String providerClassName)

public final String
protected Provider

Returns:

The resolved Provider instance - Note: the result is cached - i.e., successful resolution result will not cause the code to re-resolve the provider
getOrCreateProvider
(String
The fully-qualified class name to instantiate if a provider not already registered
providerClassName
)

Attempts to see if a provider with this name already registered.

public Map<String, Object>
getProperties()

Overrides default org.apache.sshd.common.util.security.SecurityProviderRegistrar.getProperties.

A map of properties that can be used to configure the SSH server or client.

public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

nameback to summary
private final String name
propsback to summary
protected final Map<String, Object> props
providerHolderback to summary
protected final AtomicReference<Provider> providerHolder
supportedEntitiesback to summary
protected final Map<Class<?>, Map<String, Boolean>> supportedEntities

Constructor Detail

AbstractSecurityProviderRegistrarback to summary
protected AbstractSecurityProviderRegistrar(String name)

Method Detail

createProviderInstanceback to summary
protected Provider createProviderInstance(String providerClassName) throws ReflectiveOperationException
getNameback to summary
public final String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
getOrCreateProviderback to summary
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:String

The fully-qualified class name to instantiate if a provider not already registered

Returns:Provider

The resolved Provider instance - Note: the result is cached - i.e., successful resolution result will not cause the code to re-resolve the provider

Exceptions
ReflectiveOperationException:
If failed to instantiate the provider
UnsupportedOperationException:
If registrar not supported
See Also
isSupported(), Security#getProvider(String), createProviderInstance(String)
getPropertiesback to summary
public Map<String, Object> getProperties()

Overrides default org.apache.sshd.common.util.security.SecurityProviderRegistrar.getProperties.

Doc from org.apache.sshd.common.PropertyResolver.getProperties.

A 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, the toString() 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 a long then it will be parsed into one. Also, if the mapped value is an Integer but a long is expected, then it will be converted into one.

Returns:Map<String, Object>

a valid Map containing configuration values, never null

Note

may be immutable.

Annotations
@Override
isSecurityEntitySupportedback to summary
public boolean isSecurityEntitySupported(Class<?> entityType, String name)

Overrides default org.apache.sshd.common.util.security.SecurityProviderRegistrar.isSecurityEntitySupported.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override