public class ConfigurationServiceImpl extends Object implements ConfigurationService, ServiceRegistryAwareService
ConfigurationService.Converter<T>| Constructor and Description | 
|---|
ConfigurationServiceImpl(Map settings)
Constructs a ConfigurationServiceImpl 
 | 
| Modifier and Type | Method and Description | 
|---|---|
<T> T | 
cast(Class<T> expected,
    Object candidate)
Cast candidate to the instance of expected type. 
 | 
<T> T | 
getSetting(String name,
          Class<T> expected,
          T defaultValue)
Get the named setting. 
 | 
<T> T | 
getSetting(String name,
          ConfigurationService.Converter<T> converter)
Get the named setting, using the specified converter. 
 | 
<T> T | 
getSetting(String name,
          ConfigurationService.Converter<T> converter,
          T defaultValue)
Get the named setting, using the specified converter and default value. 
 | 
Map | 
getSettings()
Access to the complete map of config settings. 
 | 
void | 
injectServices(ServiceRegistryImplementor serviceRegistry)
Callback to inject the registry. 
 | 
public ConfigurationServiceImpl(Map settings)
settings - The map of settingspublic Map getSettings()
ConfigurationServicegetSettings in interface ConfigurationServicepublic void injectServices(ServiceRegistryImplementor serviceRegistry)
ServiceRegistryAwareServiceinjectServices in interface ServiceRegistryAwareServiceserviceRegistry - The registrypublic <T> T getSetting(String name, ConfigurationService.Converter<T> converter)
ConfigurationServicegetSetting in interface ConfigurationServiceT - The Java type of the conversionname - The name of the setting to get.converter - The converter to applynull (see ConfigurationService.getSetting(String, Class, Object))public <T> T getSetting(String name, ConfigurationService.Converter<T> converter, T defaultValue)
ConfigurationServicegetSetting in interface ConfigurationServiceT - The Java type of the conversionname - The name of the setting to get.converter - The converter to applydefaultValue - If no setting with that name is found, return this default value as the result.public <T> T getSetting(String name, Class<T> expected, T defaultValue)
ConfigurationServicegetSetting in interface ConfigurationServiceT - The Java type of the conversionname - The name of the setting to get.expected - The expected Java type.defaultValue - If no setting with that name is found, return this default value as the result.public <T> T cast(Class<T> expected, Object candidate)
ConfigurationServicecast in interface ConfigurationServiceT - The java type of the expected returnexpected - The type of instance expected to return.candidate - The candidate object to be casted.Copyright © 2017 JBoss by Red Hat. All rights reserved.