Interface SecurityEntityFactory<T>
-
- Type Parameters:
T
- Type of security entity being generated by this factory
public interface SecurityEntityFactory<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<T>
getEntityType()
T
getInstance(java.lang.String algorithm)
static <F> SecurityEntityFactory<F>
toDefaultFactory(java.lang.Class<F> entityType)
static <F> SecurityEntityFactory<F>
toFactory(java.lang.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(java.lang.Class<F> entityType, java.lang.String name)
static <F> SecurityEntityFactory<F>
toProviderInstanceFactory(java.lang.Class<F> entityType, java.security.Provider provider)
-
-
-
Method Detail
-
getEntityType
java.lang.Class<T> getEntityType()
-
getInstance
T getInstance(java.lang.String algorithm) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
toFactory
static <F> SecurityEntityFactory<F> toFactory(java.lang.Class<F> entityType, SecurityProviderChoice registrar, SecurityProviderChoice defaultProvider) throws java.lang.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:
java.lang.ReflectiveOperationException
- If failed to create the factory- See Also:
toDefaultFactory(Class)
,toNamedProviderFactory(Class, String)
,toProviderInstanceFactory(Class, Provider)
,SecurityProviderChoice.isNamedProviderUsed()
,SecurityProviderChoice.getSecurityProvider()
-
toDefaultFactory
static <F> SecurityEntityFactory<F> toDefaultFactory(java.lang.Class<F> entityType) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
toNamedProviderFactory
static <F> SecurityEntityFactory<F> toNamedProviderFactory(java.lang.Class<F> entityType, java.lang.String name) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
toProviderInstanceFactory
static <F> SecurityEntityFactory<F> toProviderInstanceFactory(java.lang.Class<F> entityType, java.security.Provider provider) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
-