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 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 Map<String,KeyInfoGeneratorManager> managers
private KeyInfoGeneratorManager defaultManager
private boolean useDefaultManager
public void setUseDefaultManager(boolean newValue)
newValue
- the new option valuepublic Set<String> getManagerNames()
public KeyInfoGeneratorManager getManager(String name)
name
- the name of the manager to obtainpublic void removeManager(String name)
name
- the name of the manager to removepublic void registerFactory(String name, KeyInfoGeneratorFactory factory)
name
- the name of the factory managerfactory
- the factory to registerpublic void deregisterFactory(String name, KeyInfoGeneratorFactory factory)
name
- the name of the factory managerfactory
- the factory to de-registerpublic void registerDefaultFactory(KeyInfoGeneratorFactory factory)
factory
- the factory to registerpublic void deregisterDefaultFactory(KeyInfoGeneratorFactory factory)
factory
- the factory to de-registerpublic KeyInfoGeneratorManager getDefaultManager()
public KeyInfoGeneratorFactory getFactory(String name, Credential credential)
name
- the name of the factory mangercredential
- the credential to evaluateCopyright © 1999–2017. All rights reserved.