java.lang.Object
org.refcodes.web.HttpClientContextBuilder
- All Implemented Interfaces:
org.refcodes.security.TrustStoreDescriptorAccessor,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpClientContextBuilder>,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty,BaseUrlAccessor,BaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>,BaseUrlAccessor.BaseUrlMutator,BaseUrlAccessor.BaseUrlProperty,HttpClientContext
public class HttpClientContextBuilder
extends Object
implements HttpClientContext, BaseUrlAccessor.BaseUrlProperty, BaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpClientContextBuilder>
The
HttpClientContextBuilder implements the
HttpClientContextBuilder interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.web.BaseUrlAccessor
BaseUrlAccessor.BaseUrlBuilder<B extends BaseUrlAccessor.BaseUrlBuilder<B>>, BaseUrlAccessor.BaseUrlMutator, BaseUrlAccessor.BaseUrlPropertyNested classes/interfaces inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aHttpClientContext.HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) Constructs aHttpClientContextwith the given data. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the base URL (protocol, host, port, locator) from the base URL (protocol, host, port, locator) property.org.refcodes.security.TrustStoreDescriptorvoidsetBaseUrl(URL aBaseUrl) Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.voidsetBaseUrl(Url aBaseUrl) Sets the baseUrl(protocol, host, port, path) for the base URL (protocol, host, port, path) property.voidsetTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) withBaseUrl(String aBaseUrl) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the givenString.withBaseUrl(String aProtocol, String aHost) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.withBaseUrl(String aProtocol, String aHost, int aPort) Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int).withBaseUrl(String aProtocol, String aHost, int aPort, String aPath) Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int, String).withBaseUrl(String aProtocol, String aHost, String aPath) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.withBaseUrl(URL aBaseURL) Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort) Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int).withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath) Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int, String).withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.withBaseUrl(Url aBaseUrl) Sets the baseUrl(protocol, host, port, path) for the base URL (protocol, host, port, path) property.withTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlMutator
setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrlMethods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlProperty
letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrlMethods inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
letTrustStoreDescriptor
-
Constructor Details
-
HttpClientContextBuilder
public HttpClientContextBuilder()Constructs aHttpClientContext. -
HttpClientContextBuilder
public HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) Constructs aHttpClientContextwith the given data.
-
-
Method Details
-
getBaseUrl
Retrieves the base URL (protocol, host, port, locator) from the base URL (protocol, host, port, locator) property.- Specified by:
getBaseUrlin interfaceBaseUrlAccessor- Returns:
- The base URL (protocol, host, port, locator) stored by the base URL (protocol, host, port, locator) property.
-
setBaseUrl
Sets the baseUrl(protocol, host, port, path) for the base URL (protocol, host, port, path) property.- Specified by:
setBaseUrlin interfaceBaseUrlAccessor.BaseUrlMutator- Parameters:
aBaseUrl- The base URL (protocol, host, port, path) to be stored by the local address property.
-
setBaseUrl
Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.- Specified by:
setBaseUrlin interfaceBaseUrlAccessor.BaseUrlMutator- Parameters:
aBaseUrl- The base URL (protocol, host, port, path) to be stored by the local address property.
-
getTrustStoreDescriptor
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()- Specified by:
getTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor
-
setTrustStoreDescriptor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) - Specified by:
setTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
-
withBaseUrl
Sets the baseUrl(protocol, host, port, path) for the base URL (protocol, host, port, path) property.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aBaseUrl- The base URL (protocol, host, port, path) to be stored by the local address property.- Returns:
- The builder for applying multiple build operations.
-
withBaseUrl
Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aBaseURL- The base URL (protocol, host, port, path) to be stored by the local address property.- Returns:
- The builder for applying multiple build operations.
-
withBaseUrl
Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the givenString.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aBaseUrl- TheStringrepresenting theURL.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case theStringcannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(String aProtocol, String aHost) throws MalformedURLException Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aProtocol- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost) throws MalformedURLException Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aScheme- TheScheme(e.g.Scheme.HTTPorScheme.HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(String aProtocol, String aHost, String aPath) throws MalformedURLException Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aProtocol- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPath- The path on the host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath) throws MalformedURLException Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aScheme- TheScheme(e.g.Scheme.HTTPorScheme.HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPath- The path on the host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(String aProtocol, String aHost, int aPort) throws MalformedURLException Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int).- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aProtocol- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPort- The port to be used when connecting to the host.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort) throws MalformedURLException Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int).- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aScheme- TheScheme(e.g.Scheme.HTTPorScheme.HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPort- The port to be used when connecting to the host.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(String aProtocol, String aHost, int aPort, String aPath) throws MalformedURLException Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int, String).- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aProtocol- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath) throws MalformedURLException Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int, String).- Specified by:
withBaseUrlin interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>- Parameters:
aScheme- TheScheme(e.g.Scheme.HTTPorScheme.HTTPS) to be used for the baseURL.aHost- The host to which the baseURLis to point to.aPort- The port to be used when connecting to the host.aPath- The path on the host to which the baseURLis to point to.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException- in case the parameters cannot be converted to a valid (accepted)URL.
-
withTrustStoreDescriptor
public HttpClientContextBuilder withTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) - Specified by:
withTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpClientContextBuilder>
-