Class MapBasedConfiguration
java.lang.Object
org.opensaml.core.config.provider.MapBasedConfiguration
- All Implemented Interfaces:
Configuration
A configuration implementation which stores registered configuration instances in a
local instance of
ConcurrentHashMap
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
deregister
(Class<T> configClass, String partitionName) Deregister a configuration instance.<T> T
Obtain the registered configuration instance.getPartition
(String partitionName) Get the Map instance which corresponds to the specified partition name.<T,
I extends T>
voidRegister a configuration instance.
-
Field Details
-
storage
Storage for registered configuration objects.
-
-
Constructor Details
-
MapBasedConfiguration
public MapBasedConfiguration()Constructor.
-
-
Method Details
-
get
Obtain the registered configuration instance.- Specified by:
get
in interfaceConfiguration
- Type Parameters:
T
- the type of configuration being retrieved, typically an interface- Parameters:
configClass
- the configuration class identifier, typically an interfacepartitionName
- the partition name to use- Returns:
- the instance of the registered configuration interface, or null
-
register
Register a configuration instance.- Specified by:
register
in interfaceConfiguration
- Type Parameters:
T
- the type of configuration being registered, typically an interfaceI
- the configuration implementation being registered, which will be an instance ofT
- Parameters:
configClass
- the type of configuration class being registered, typically an interfaceconfiguration
- the configuration implementation instance being registeredpartitionName
- the partition name to use
-
deregister
Deregister a configuration instance.- Specified by:
deregister
in interfaceConfiguration
- Type Parameters:
T
- the type of configuration being deregistered, typically an interface- Parameters:
configClass
- the type of configuration class being deregistered , typically an interfacepartitionName
- the partition name to use- Returns:
- the configuration implementation instance which was deregistered, or null
-
getPartition
Get the Map instance which corresponds to the specified partition name.- Parameters:
partitionName
- the partition name to use- Returns:
- the Map corresponding to the partition name. A new empty Map will be created if necessary
-