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

public Interface SecurityEntityFactory<T>

Type Parameters
<T>
Type of security entity being generated by this factory
Imports
java.lang.reflect.Method, java.security.GeneralSecurityException, .Provider, java.util.Objects, org.apache.sshd.common.util.ExceptionUtils, .ValidateUtils

Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public Class<T>
public T
getInstance(String algorithm)

public static <F> SecurityEntityFactory<F>
toDefaultFactory(Class<F> entityType)

public static <
Type of entity being generated by the factor
F
>
SecurityEntityFactory<F>

Returns:

The SecurityEntityFactory for the entity
toFactory
(Class<F>
The entity type class
entityType
,
SecurityProviderChoice
The SecurityProviderRegistrar to use - if null then default provider is used (if specified).
registrar
,
SecurityProviderChoice
Default provider choice to use if no registrar provided. If null/empty then JCE default is used
defaultProvider
)

Uses reflection in order to wrap the getInstance method(s) as a security entity factory.

public static <F> SecurityEntityFactory<F>
toNamedProviderFactory(Class<F> entityType, String name)

public static <F> SecurityEntityFactory<F>
toProviderInstanceFactory(Class<F> entityType, Provider provider)

Method Detail

getEntityTypeback to summary
public Class<T> getEntityType()
getInstanceback to summary
public T getInstance(String algorithm) throws GeneralSecurityException
toDefaultFactoryback to summary
public static <F> SecurityEntityFactory<F> toDefaultFactory(Class<F> entityType) throws ReflectiveOperationException
toFactoryback to summary
public static <F> SecurityEntityFactory<F> toFactory(Class<F> entityType, SecurityProviderChoice registrar, SecurityProviderChoice defaultProvider) throws ReflectiveOperationException

Uses reflection in order to wrap the getInstance method(s) as a security entity factory.

Parameters
<F>
Type of entity being generated by the factor
entityType:Class<F>

The entity type class

registrar:SecurityProviderChoice

The SecurityProviderRegistrar to use - if null then default provider is used (if specified).

defaultProvider:SecurityProviderChoice

Default provider choice to use if no registrar provided. If null/empty then JCE default is used

Returns:SecurityEntityFactory<F>

The SecurityEntityFactory for the entity

Exceptions
ReflectiveOperationException:
If failed to create the factory
See Also
toDefaultFactory(Class), toNamedProviderFactory(Class, String), toProviderInstanceFactory(Class, Provider), SecurityProviderChoice#isNamedProviderUsed(), SecurityProviderChoice#getSecurityProvider()
toNamedProviderFactoryback to summary
public static <F> SecurityEntityFactory<F> toNamedProviderFactory(Class<F> entityType, String name) throws ReflectiveOperationException
toProviderInstanceFactoryback to summary
public static <F> SecurityEntityFactory<F> toProviderInstanceFactory(Class<F> entityType, Provider provider) throws ReflectiveOperationException