- 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>
TheHttpClientContextBuilderimplements theHttpClientContextBuilderinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.web.BaseUrlAccessor
BaseUrlAccessor.BaseUrlBuilder<B extends BaseUrlAccessor.BaseUrlBuilder<B>>, BaseUrlAccessor.BaseUrlMutator, BaseUrlAccessor.BaseUrlProperty
-
Nested 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
Constructors Constructor Description HttpClientContextBuilder()Constructs aHttpClientContext.HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor)Constructs aHttpClientContextwith the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlgetBaseUrl()Retrieves the base URL (protocol, host, port, locator) from the base URL (protocol, host, port, locator) property.org.refcodes.security.TrustStoreDescriptorgetTrustStoreDescriptor()voidsetBaseUrl(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)HttpClientContextBuilderwithBaseUrl(String aBaseUrl)Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the givenString.HttpClientContextBuilderwithBaseUrl(String aProtocol, String aHost)Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.HttpClientContextBuilderwithBaseUrl(String aProtocol, String aHost, int aPort)Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int).HttpClientContextBuilderwithBaseUrl(String aProtocol, String aHost, int aPort, String aPath)Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int, String).HttpClientContextBuilderwithBaseUrl(String aProtocol, String aHost, String aPath)Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.HttpClientContextBuilderwithBaseUrl(URL aBaseURL)Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.HttpClientContextBuilderwithBaseUrl(org.refcodes.data.Scheme aScheme, String aHost)Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)except that aMalformedURLExceptionmay occur when creating theURLinstance from the given parameters.HttpClientContextBuilderwithBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort)Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int).HttpClientContextBuilderwithBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath)Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int, String).HttpClientContextBuilderwithBaseUrl(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.HttpClientContextBuilderwithBaseUrl(Url aBaseUrl)Sets the baseUrl(protocol, host, port, path) for the base URL (protocol, host, port, path) property.HttpClientContextBuilderwithTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlMutator
setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl
-
Methods inherited from interface org.refcodes.web.BaseUrlAccessor.BaseUrlProperty
letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl, letBaseUrl
-
-
-
-
Constructor Detail
-
HttpClientContextBuilder
public HttpClientContextBuilder()
Constructs aHttpClientContext.
-
HttpClientContextBuilder
public HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor)
Constructs aHttpClientContextwith the given data.
-
-
Method Detail
-
getBaseUrl
public Url 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
public void setBaseUrl(Url aBaseUrl)
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
public void setBaseUrl(URL aBaseUrl)
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
public HttpClientContextBuilder withBaseUrl(Url aBaseUrl)
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
public HttpClientContextBuilder withBaseUrl(URL aBaseURL)
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
public HttpClientContextBuilder withBaseUrl(String aBaseUrl) throws MalformedURLException
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>
-
-