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.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
ConstructorDescriptionConstructs aHttpClientContext
.HttpClientContextBuilder
(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) Constructs aHttpClientContext
with 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.TrustStoreDescriptor
void
setBaseUrl
(URL aBaseUrl) Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.void
setBaseUrl
(Url aBaseUrl) Sets the baseUrl
(protocol, host, port, path) for the base URL (protocol, host, port, path) property.void
setTrustStoreDescriptor
(org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) withBaseUrl
(String aBaseUrl) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)
except that aMalformedURLException
may occur when creating theURL
instance from the givenString
.withBaseUrl
(String aProtocol, String aHost) Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)
except that aMalformedURLException
may occur when creating theURL
instance 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 aMalformedURLException
may occur when creating theURL
instance 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 aMalformedURLException
may occur when creating theURL
instance 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 aMalformedURLException
may occur when creating theURL
instance 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, 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
Methods 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 aHttpClientContext
with 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:
getBaseUrl
in 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:
setBaseUrl
in 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:
setBaseUrl
in 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:
getTrustStoreDescriptor
in interfaceorg.refcodes.security.TrustStoreDescriptorAccessor
-
setTrustStoreDescriptor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor) - Specified by:
setTrustStoreDescriptor
in interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
-
withBaseUrl
Sets the baseUrl
(protocol, host, port, path) for the base URL (protocol, host, port, path) property.- Specified by:
withBaseUrl
in 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:
withBaseUrl
in 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 aMalformedURLException
may occur when creating theURL
instance from the givenString
.- Specified by:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aBaseUrl
- TheString
representing theURL
.- Returns:
- The builder for applying multiple build operations.
- Throws:
MalformedURLException
- in case theString
cannot be converted to a valid (accepted)URL
.
-
withBaseUrl
public HttpClientContextBuilder withBaseUrl(String aProtocol, String aHost) throws MalformedURLException Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)
except that aMalformedURLException
may occur when creating theURL
instance from the given parameters.- Specified by:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aProtocol
- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL
.aHost
- The host to which the baseURL
is 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 aMalformedURLException
may occur when creating theURL
instance from the given parameters.- Specified by:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aScheme
- TheScheme
(e.g.Scheme.HTTP
orScheme.HTTPS
) to be used for the baseURL
.aHost
- The host to which the baseURL
is 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 aMalformedURLException
may occur when creating theURL
instance from the given parameters.- Specified by:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aProtocol
- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL
.aHost
- The host to which the baseURL
is to point to.aPath
- The path on the host to which the baseURL
is 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 aMalformedURLException
may occur when creating theURL
instance from the given parameters.- Specified by:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aScheme
- TheScheme
(e.g.Scheme.HTTP
orScheme.HTTPS
) to be used for the baseURL
.aHost
- The host to which the baseURL
is to point to.aPath
- The path on the host to which the baseURL
is 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:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aProtocol
- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL
.aHost
- The host to which the baseURL
is 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:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aScheme
- TheScheme
(e.g.Scheme.HTTP
orScheme.HTTPS
) to be used for the baseURL
.aHost
- The host to which the baseURL
is 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:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aProtocol
- The protocol (e.g. HTTP or HTTPS) to be used for the baseURL
.aHost
- The host to which the baseURL
is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the baseURL
is 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:
withBaseUrl
in interfaceBaseUrlAccessor.BaseUrlBuilder<HttpClientContextBuilder>
- Parameters:
aScheme
- TheScheme
(e.g.Scheme.HTTP
orScheme.HTTPS
) to be used for the baseURL
.aHost
- The host to which the baseURL
is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the baseURL
is 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:
withTrustStoreDescriptor
in interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpClientContextBuilder>
-