Package org.opensaml.xmlsec.keyinfo
Class KeyInfoGeneratorManager
java.lang.Object
org.opensaml.xmlsec.keyinfo.KeyInfoGeneratorManager
A manager for
KeyInfoGeneratorFactory instances. Factories are uniquely indexed according to the
value returned by KeyInfoGeneratorFactory.getCredentialType().-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Class<? extends Credential>,KeyInfoGeneratorFactory> The factories being managed, indexed by credential type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidderegisterFactory(KeyInfoGeneratorFactory factory) De-register a factory within this manager instance.Get the (unmodifiable) collection of all factories managed by this manager.getFactory(Credential credential) Get the factory which produces KeyInfoGenerators which can handle the specified credential.voidregisterFactory(KeyInfoGeneratorFactory factory) Register a factory within this manager instance.
-
Field Details
-
factories
The factories being managed, indexed by credential type.
-
-
Constructor Details
-
KeyInfoGeneratorManager
public KeyInfoGeneratorManager()Constructor.
-
-
Method Details
-
registerFactory
Register a factory within this manager instance. If a factory already exists for that credential type, it will be replaced.- Parameters:
factory- the factory to register
-
deregisterFactory
De-register a factory within this manager instance.- Parameters:
factory- the factory to de-register
-
getFactories
Get the (unmodifiable) collection of all factories managed by this manager.- Returns:
- the collection of managed factories
-
getFactory
Get the factory which produces KeyInfoGenerators which can handle the specified credential.- Parameters:
credential- the credential for which to locate a factory- Returns:
- a KeyInfoGeneratorFactory instance appropriate for the credential
-