public class NamedKeyInfoGeneratorManager extends Object
KeyInfoGeneratorFactory
instances. Each name key serves as an index to an
instance of KeyInfoGeneratorManager
.Modifier and Type | Field and Description |
---|---|
private KeyInfoGeneratorManager |
defaultManager
The default manager for unnamed factories.
|
private org.slf4j.Logger |
log
Logger.
|
private Map<String,KeyInfoGeneratorManager> |
managers
The set of named factory managers.
|
private boolean |
useDefaultManager
Flag indicating whether the default (unnamed) factory manager will be used to
lookup factories for credentials.
|
Constructor and Description |
---|
NamedKeyInfoGeneratorManager()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterDefaultFactory(KeyInfoGeneratorFactory factory)
De-register a factory with the default (unnamed) manager.
|
void |
deregisterFactory(String name,
KeyInfoGeneratorFactory factory)
De-register a factory within the specified named manager.
|
KeyInfoGeneratorManager |
getDefaultManager()
Get the default (unnamed) factory manager.
|
KeyInfoGeneratorFactory |
getFactory(String name,
Credential credential)
Lookup and return the named generator factory for the type of the credential specified.
|
KeyInfoGeneratorManager |
getManager(String name)
Get the named factory manager.
|
Set<String> |
getManagerNames()
Get the (unmodifiable) set of names of factory managers currently available.
|
void |
registerDefaultFactory(KeyInfoGeneratorFactory factory)
Register a factory with the default (unnamed) manager.
|
void |
registerFactory(String name,
KeyInfoGeneratorFactory factory)
Register a factory within the specified named manager.
|
void |
removeManager(String name)
Remove the named factory manager, and all its managed factories.
|
void |
setUseDefaultManager(boolean newValue)
Set the option as to whether the default (unnamed) manager will be used to lookup factories
for credentials if there is no appropriate named factory for the credential type.
|
private final org.slf4j.Logger log
private final Map<String,KeyInfoGeneratorManager> managers
private final KeyInfoGeneratorManager defaultManager
private boolean useDefaultManager
public void setUseDefaultManager(boolean newValue)
newValue
- the new option value@Nonnull public Set<String> getManagerNames()
@Nonnull public KeyInfoGeneratorManager getManager(@Nonnull String name)
name
- the name of the manager to obtainpublic void removeManager(@Nonnull String name)
name
- the name of the manager to removepublic void registerFactory(@Nonnull String name, @Nonnull KeyInfoGeneratorFactory factory)
name
- the name of the factory managerfactory
- the factory to registerpublic void deregisterFactory(@Nonnull String name, @Nonnull KeyInfoGeneratorFactory factory)
name
- the name of the factory managerfactory
- the factory to de-registerpublic void registerDefaultFactory(@Nonnull KeyInfoGeneratorFactory factory)
factory
- the factory to registerpublic void deregisterDefaultFactory(@Nonnull KeyInfoGeneratorFactory factory)
factory
- the factory to de-register@Nonnull public KeyInfoGeneratorManager getDefaultManager()
@Nullable public KeyInfoGeneratorFactory getFactory(@Nonnull String name, @Nonnull Credential credential)
name
- the name of the factory mangercredential
- the credential to evaluateCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.