public class BrokerConfigurationKeyGenerator extends Object
SharedResourcesBroker can understand. Useful
for populating a configuration programmatically.| Constructor and Description |
|---|
BrokerConfigurationKeyGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateKey(SharedResourceFactory factory,
SharedResourceKey key,
ScopeType scopeType,
String configKey)
Generate a
SharedResourcesBroker configuration key for a particular SharedResourceFactory,
SharedResourceKey and ScopeType. |
public static String generateKey(@Nonnull SharedResourceFactory factory, SharedResourceKey key, ScopeType scopeType, @Nonnull String configKey)
SharedResourcesBroker configuration key for a particular SharedResourceFactory,
SharedResourceKey and ScopeType.
Example:
If the broker configuration contains a key-value pair with key:
generateKey(myFactory, myKey, myScopeType, "sample.key")
when requesting a resource created by myFactory, with the provided key and scope, the factory will be able to see
the key-value pair specified.
Note:
SharedResourceKey and ScopeType may be null. In this case, the key-value pair will be visible to
the factory regardless of the key and scope requested by the user.