Class HttpClientOptions
java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.refcodes.ontology.Taxonomy
org.refcodes.runtime.Settings
org.refcodes.runtime.Options
org.refcodes.rest.HttpClientOptions
- All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, ExecutorServiceAccessor, Clearable, EmptyAccessor, Ontology, Diagnosable, Schemable<DiagnosticOptions>, TrustStoreDescriptorAccessor, Containable, ImmutableTable<String, Object>, ImmutableTable.MutableTable<String, Object>, Keys<String, Object>, Keys.MutableKeys<String, Object>, Keys.MutableValues<String, Object>, BaseUrlAccessor, HttpClientContext
public class HttpClientOptions
extends Options
implements HttpClientContext, ExecutorServiceAccessor
Typed
Options implementation describing the configuration of an HTTP
client.
The HttpClientOptions class combines:
- the semantic contract of
HttpClientContext - the flexibility of the
Optionsinfrastructure - type-safe convenience accessors
- support for environment variables and system properties
- diagnostic schema generation
Supported configuration properties are declared by the
HttpClientOntology.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Settings
Settings.Node, Settings.Properties, Settings.RootNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> Nested classes/interfaces inherited from interface BaseUrlAccessor
BaseUrlAccessor.BaseUrlBuilder<B>, BaseUrlAccessor.BaseUrlMutator, BaseUrlAccessor.BaseUrlPropertyNested classes/interfaces inherited from interface EmptyAccessor
EmptyAccessor.EmptyBuilder<B>, EmptyAccessor.EmptyMutator, EmptyAccessor.EmptyPropertyNested classes/interfaces inherited from interface ExecutorServiceAccessor
ExecutorServiceAccessor.ExecutorServiceBuilder<B>, ExecutorServiceAccessor.ExecutorServiceMutator, ExecutorServiceAccessor.ExecutorServicePropertyNested classes/interfaces inherited from interface ImmutableTable
ImmutableTable.MutableTable<K,V> Nested classes/interfaces inherited from interface Keys
Keys.MutableKeys<K,V>, Keys.MutableValues<K, V> Nested classes/interfaces inherited from interface TrustStoreDescriptorAccessor
TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>, TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty -
Field Summary
Fields inherited from class Taxonomy
NAMESPACE_SEPARATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs an emptyHttpClientOptionsinstance.protectedHttpClientOptions(HttpClientOptions.Builder aBuilder) Constructs a new instance from the given builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientOptions.Builderbuilder()Creates a newHttpClientOptions.Builder.Returns the configured baseUrl.Returns the configured TLS/SSL truststore descriptor.Methods inherited from class Settings
createResult, fromNamespace, merge, ofNamespace, removeNamespace, toSchema, toSchema, transformKeys, transformValuesMethods inherited from class Taxonomy
contains, containsNamespace, get, get, get, get, getOr, namespaces, put, put, remove, toKey, toNormalizedMethods inherited from class HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, newHashMap, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Containable
sizeMethods inherited from interface EmptyAccessor
isEmptyMethods inherited from interface ImmutableTable.MutableTable
delete, putMethods inherited from interface Keys
containsKey, containsValue, getOr, keySet, valuesMethods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
HttpClientOptions
public HttpClientOptions()Constructs an emptyHttpClientOptionsinstance. -
HttpClientOptions
Constructs a new instance from the given builder.- Parameters:
aBuilder- The builder from which to populate this instance.
-
-
Method Details
-
getBaseUrl
Returns the configured baseUrl.- Specified by:
getBaseUrlin interfaceBaseUrlAccessor- Returns:
- The configured base
Urlornull.
-
getTrustStoreDescriptor
Returns the configured TLS/SSL truststore descriptor.- Specified by:
getTrustStoreDescriptorin interfaceTrustStoreDescriptorAccessor- Returns:
- The configured truststore descriptor or
null.
-
getExecutorService
- Specified by:
getExecutorServicein interfaceExecutorServiceAccessor
-
builder
Creates a newHttpClientOptions.Builder.- Returns:
- A new builder instance.
-