public class DefaultHttpDestination extends Object implements HttpDestination
HttpDestination
interface.Modifier and Type | Class and Description |
---|---|
static class |
DefaultHttpDestination.Builder
Builder class to allow for easy creation of an immutable
DefaultHttpDestination instance. |
Modifier and Type | Field and Description |
---|---|
protected List<Header> |
httpHeaders
Headers prepared for this destination.
|
Constructor and Description |
---|
DefaultHttpDestination(DestinationProperties baseProperties)
Creates a new instance of based on the given "generic" destination.
|
Modifier and Type | Method and Description |
---|---|
static DefaultHttpDestination.Builder |
builder(HttpDestinationProperties httpDestination)
Starts a builder to be used to create a
DefaultHttpDestination with some properties. |
static DefaultHttpDestination.Builder |
builder(String uri)
Starts a builder to be used to create a
DefaultHttpDestination with some properties. |
static DefaultHttpDestination.Builder |
builder(URI uri)
Starts a builder to be used to create a
DefaultHttpDestination with some properties. |
static boolean |
canDecorate(DestinationProperties destination)
Verifies that the given "generic" destination might be decorated into a
DefaultHttpDestination . |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
io.vavr.control.Option<Object> |
get(String someKey)
Gets the value associated with the given key (if any).
|
AuthenticationType |
getAuthenticationType()
Returns the authentication type to be expected when authenticating at the remote system.
|
io.vavr.control.Option<BasicCredentials> |
getBasicCredentials()
Returns the basic credentials to be used for authentication at the remote system.
|
Collection<Header> |
getHeaders(URI requestUri)
Getter for a collection of header that should be added to the outgoing request for this destination.
|
io.vavr.control.Option<KeyStore> |
getKeyStore()
The KeyStore to be used when communicating over HTTP.
|
io.vavr.control.Option<String> |
getKeyStorePassword()
The password for the Key Store to be used when communicating over HTTP.
|
io.vavr.control.Option<String> |
getName() |
Iterable<String> |
getPropertyNames()
Retrieves the set of property keys of the destination.
|
io.vavr.control.Option<ProxyConfiguration> |
getProxyConfiguration()
The
ProxyConfiguration to be used when communicating over HTTP. |
io.vavr.control.Option<ProxyType> |
getProxyType()
Returns the
ProxyType that is configured for this destination. |
SecurityConfigurationStrategy |
getSecurityConfigurationStrategy()
Defines from where the HTTP Security Configuration (see
HttpSecuritySettings ) for outbound HTTP calls via
this destination is determined from. |
io.vavr.control.Option<String> |
getTlsVersion()
The TLS version to be used when communicating over HTTP.
|
io.vavr.control.Option<KeyStore> |
getTrustStore()
Returns the optional trust store of the destination.
|
io.vavr.control.Option<String> |
getTrustStorePassword()
Returns the optional trust store password of the destination.
|
URI |
getUri()
Getter for the
URI to communicate with. |
int |
hashCode() |
boolean |
isTrustingAllCertificates()
Indicates whether all server certificates should be accepted when communicating over HTTP.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
decorate
get, get, get
public DefaultHttpDestination(@Nonnull DestinationProperties baseProperties)
baseProperties
- The destination to take the properties from.public static boolean canDecorate(@Nonnull DestinationProperties destination)
DefaultHttpDestination
.destination
- The destination to check.true
, if the given destination is decoratable as a DefaultHttpDestination
; false
otherwise.@Nonnull public static DefaultHttpDestination.Builder builder(@Nonnull URI uri)
DefaultHttpDestination
with some properties.uri
- The uri of the DefaultHttpDestination
to be created.Builder
instance.@Nonnull public static DefaultHttpDestination.Builder builder(@Nonnull String uri)
DefaultHttpDestination
with some properties.uri
- The uri of the DefaultHttpDestination
to be created. In case this is no valid URI an
IllegalArgumentException
will be thrown.Builder
instance.IllegalArgumentException
- if the given uri
is no valid URI.@Nonnull public static DefaultHttpDestination.Builder builder(@Nonnull HttpDestinationProperties httpDestination)
DefaultHttpDestination
with some properties.
Copies all properties from the given destination to the returned builder instance. Also, all headers retrieved
via HttpDestinationProperties.getHeaders(URI)
for the destination URI are copied to the new destination.httpDestination
- The HttpDestinationProperties
instance to copy the values for the new destination from.Builder
instance.@Nonnull public io.vavr.control.Option<Object> get(@Nonnull String someKey)
get
in interface DestinationProperties
someKey
- The key to get the value for.Option
object containing the value, if any.@Nonnull public Iterable<String> getPropertyNames()
getPropertyNames
in interface DestinationProperties
@Nonnull public URI getUri()
URI
to communicate with.
This is a mandatory property of a HttpDestination.
getUri
in interface HttpDestinationProperties
URI
to be used with this destination.@Nonnull public Collection<Header> getHeaders(@Nonnull URI requestUri)
getHeaders
in interface HttpDestinationProperties
requestUri
- The target URI of a request to which HTTP headers should be added.@Nonnull public io.vavr.control.Option<String> getTlsVersion()
getTlsVersion
in interface HttpDestinationProperties
Option
wrapping the TLS version to use, if any.@Nonnull public io.vavr.control.Option<KeyStore> getKeyStore()
getKeyStore
in interface HttpDestinationProperties
Option
wrapping the KeyStore to use, if any.@Nonnull public io.vavr.control.Option<String> getKeyStorePassword()
getKeyStorePassword
in interface HttpDestinationProperties
Option
wrapping the password to use, if any.public boolean isTrustingAllCertificates()
isTrustingAllCertificates
in interface HttpDestinationProperties
true
if all certificates should be accepted, false
otherwise.@Nonnull public io.vavr.control.Option<KeyStore> getTrustStore()
getTrustStore
in interface HttpDestinationProperties
@Nonnull public io.vavr.control.Option<String> getTrustStorePassword()
getTrustStorePassword
in interface HttpDestinationProperties
@Nonnull @Beta public SecurityConfigurationStrategy getSecurityConfigurationStrategy()
HttpDestinationProperties
HttpSecuritySettings
) for outbound HTTP calls via
this destination is determined from.getSecurityConfigurationStrategy
in interface HttpDestinationProperties
SecurityConfigurationStrategy
of the destination@Nonnull public AuthenticationType getAuthenticationType()
getAuthenticationType
in interface HttpDestinationProperties
@Nonnull public io.vavr.control.Option<ProxyType> getProxyType()
ProxyType
that is configured for this destination.getProxyType
in interface HttpDestinationProperties
Option
wrapping the ProxyType
to use, if any.@Nonnull public io.vavr.control.Option<ProxyConfiguration> getProxyConfiguration()
HttpDestinationProperties
ProxyConfiguration
to be used when communicating over HTTP.getProxyConfiguration
in interface HttpDestinationProperties
Option
wrapping the ProxyConfiguration
to use, if any.@Nonnull public io.vavr.control.Option<BasicCredentials> getBasicCredentials()
HttpDestinationProperties
getBasicCredentials
in interface HttpDestinationProperties
Option
wrapping the BasicCredentials
to use, if any.Copyright © 2021 SAP SE. All rights reserved.