Package org.jboss.resteasy.spi.config
Class DefaultConfiguration
- java.lang.Object
 - 
- org.jboss.resteasy.spi.config.DefaultConfiguration
 
 
- 
- All Implemented Interfaces:
 Configuration
public class DefaultConfiguration extends Object implements Configuration
A default configuration which first attempts to use the Eclipse MicroProfile Config API. If the MicroProfile Config API is not available value is searched in the following order:- System properties
 - Environment variables
 ResteasyConfiguration
- Author:
 - James R. Perkins
 
 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultConfiguration()Creates a new configuration which uses system properties to resolve the values if the Eclipse MicroProfile Config is not on the class path.DefaultConfiguration(ResteasyConfiguration config)Creates a new configuration which uses the configuration to resolve the values if the Eclipse MicroProfile Config is not on the class path. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Optional<T>getOptionalValue(String name, Class<T> type)Returns the resolved value for the specified type of the named property.<T> TgetValue(String name, Class<T> type)Returns the resolved value for the specified type of the named property. 
 - 
 
- 
- 
Constructor Detail
- 
DefaultConfiguration
public DefaultConfiguration()
Creates a new configuration which uses system properties to resolve the values if the Eclipse MicroProfile Config is not on the class path. 
- 
DefaultConfiguration
public DefaultConfiguration(ResteasyConfiguration config)
Creates a new configuration which uses the configuration to resolve the values if the Eclipse MicroProfile Config is not on the class path.- Parameters:
 config- the resolver
 
 - 
 
- 
Method Detail
- 
getOptionalValue
public <T> Optional<T> getOptionalValue(String name, Class<T> type)
Description copied from interface:ConfigurationReturns the resolved value for the specified type of the named property.- Specified by:
 getOptionalValuein interfaceConfiguration- Type Parameters:
 T- the property type- Parameters:
 name- the name of the parametertype- the type to convert the value to- Returns:
 - the resolved optional value
 
 
- 
getValue
public <T> T getValue(String name, Class<T> type)
Description copied from interface:ConfigurationReturns the resolved value for the specified type of the named property.- Specified by:
 getValuein interfaceConfiguration- Type Parameters:
 T- the property type- Parameters:
 name- the name of the parametertype- the type to convert the value to- Returns:
 - the resolved value
 
 
 - 
 
 -