public final class Configuration extends Object
ApiClientImpls.
Use Configuration.Builder or the static factory methods to create instances of
this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.Builder
Builder for
Configuration instances. |
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP_CONFIG_CFG |
static String |
STUB_CONFIG_CFG |
| Modifier | Constructor and Description |
|---|---|
protected |
Configuration(Map<String,Object> props)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getAllProperties() |
<T> T |
getProperty(String propName,
Class<T> propClass)
Get the value of given configuration property.
|
static Configuration |
newEmptyConfig()
Creates a new empty configuration.
|
static Configuration |
newHttpConfig(HttpConfiguration httpConfig)
Creates a new configuration instance which holds HTTP settings.
|
static Configuration |
newStubConfig(StubConfiguration stubConfig)
Creates a new configuration instance which holds stub configuration.
|
Set<String> |
properties()
Returns the names of all configuration properties registered with this instance.
|
public static final String HTTP_CONFIG_CFG
public static final String STUB_CONFIG_CFG
public Set<String> properties()
public <T> T getProperty(String propName, Class<T> propClass)
The type of the value must be specified, and the returned reference is of that type.
propName - name of the property to fetch; must not be nullpropClass - expected type of the property value; must not be nullnull if no
property is registered for propNameClassCastException - if property is found but its value doesn't match the expected
type specified by propClasspublic static Configuration newEmptyConfig()
public static Configuration newHttpConfig(HttpConfiguration httpConfig)
httpConfig - HTTP settings to usepublic static Configuration newStubConfig(StubConfiguration stubConfig)
stubConfig - stub settings to useCopyright © 2023. All rights reserved.