- 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>
TheHttpClientContextBuilder
implements theHttpClientContextBuilder
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
Constructors Constructor Description HttpClientContextBuilder()
Constructs aHttpClientContext
.HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor)
Constructs aHttpClientContext
with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Url
getBaseUrl()
Retrieves the base URL (protocol, host, port, locator) from the base URL (protocol, host, port, locator) property.org.refcodes.security.TrustStoreDescriptor
getTrustStoreDescriptor()
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)
HttpClientContextBuilder
withBaseUrl(String aBaseUrl)
Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)
except that aMalformedURLException
may occur when creating theURL
instance from the givenString
.HttpClientContextBuilder
withBaseUrl(String aProtocol, String aHost)
Same asBaseUrlAccessor.BaseUrlBuilder.withBaseUrl(URL)
except that aMalformedURLException
may occur when creating theURL
instance from the given parameters.HttpClientContextBuilder
withBaseUrl(String aProtocol, String aHost, int aPort)
Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int)
.HttpClientContextBuilder
withBaseUrl(String aProtocol, String aHost, int aPort, String aPath)
Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String, String, int, String)
.HttpClientContextBuilder
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.HttpClientContextBuilder
withBaseUrl(URL aBaseURL)
Sets the base URL (protocol, host, port, path) for the base URL (protocol, host, port, path) property.HttpClientContextBuilder
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.HttpClientContextBuilder
withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort)
Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int)
.HttpClientContextBuilder
withBaseUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath)
Builder method forBaseUrlAccessor.BaseUrlMutator.setBaseUrl(Scheme, String, int, String)
.HttpClientContextBuilder
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.HttpClientContextBuilder
withBaseUrl(Url aBaseUrl)
Sets the baseUrl
(protocol, host, port, path) for the base URL (protocol, host, port, path) property.HttpClientContextBuilder
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
-
-
-
-
Constructor Detail
-
HttpClientContextBuilder
public HttpClientContextBuilder()
Constructs aHttpClientContext
.
-
HttpClientContextBuilder
public HttpClientContextBuilder(Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aTrustStoreDescriptor)
Constructs aHttpClientContext
with 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:
getBaseUrl
in 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:
setBaseUrl
in 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:
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
public HttpClientContextBuilder withBaseUrl(Url aBaseUrl)
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
public HttpClientContextBuilder withBaseUrl(URL aBaseURL)
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
public HttpClientContextBuilder withBaseUrl(String aBaseUrl) throws MalformedURLException
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>
-
-