Interface SecurityEntityFactory<T>
- Type Parameters:
T
- Type of security entity being generated by this factory
public interface SecurityEntityFactory<T>
-
Method Summary
Modifier and TypeMethodDescriptiongetInstance
(String algorithm) static <F> SecurityEntityFactory
<F> toDefaultFactory
(Class<F> entityType) static <F> SecurityEntityFactory
<F> toFactory
(Class<F> entityType, SecurityProviderChoice registrar, SecurityProviderChoice defaultProvider) Uses reflection in order to wrap thegetInstance
method(s) as a security entity factory.static <F> SecurityEntityFactory
<F> toNamedProviderFactory
(Class<F> entityType, String name) static <F> SecurityEntityFactory
<F> toProviderInstanceFactory
(Class<F> entityType, Provider provider)
-
Method Details
-
getEntityType
-
getInstance
- Throws:
GeneralSecurityException
-
toFactory
static <F> SecurityEntityFactory<F> toFactory(Class<F> entityType, SecurityProviderChoice registrar, SecurityProviderChoice defaultProvider) throws ReflectiveOperationException Uses reflection in order to wrap thegetInstance
method(s) as a security entity factory.- Type Parameters:
F
- Type of entity being generated by the factor- Parameters:
entityType
- The entity type classregistrar
- TheSecurityProviderRegistrar
to use - ifnull
then default provider is used (if specified).defaultProvider
- Default provider choice to use if no registrar provided. Ifnull
/empty then JCE default is used- Returns:
- The
SecurityEntityFactory
for the entity - Throws:
ReflectiveOperationException
- If failed to create the factory- See Also:
-
toDefaultFactory
static <F> SecurityEntityFactory<F> toDefaultFactory(Class<F> entityType) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-
toNamedProviderFactory
static <F> SecurityEntityFactory<F> toNamedProviderFactory(Class<F> entityType, String name) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-
toProviderInstanceFactory
static <F> SecurityEntityFactory<F> toProviderInstanceFactory(Class<F> entityType, Provider provider) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-