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. |
Constructor and Description |
---|
DefaultHttpDestination(DestinationProperties baseProperties)
Creates a new instance of based on the given "generic" destination.
|
DefaultHttpDestination(DestinationProperties baseProperties,
Iterable<Header> headers) |
Modifier and Type | Method and Description |
---|---|
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() |
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. |
io.vavr.control.Option<String> |
getTlsVersion()
The TLS version to be used when communicating over HTTP.
|
io.vavr.control.Option<KeyStore> |
getTrustStore() |
io.vavr.control.Option<String> |
getTrustStorePassword() |
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 DefaultHttpDestination(@Nonnull DestinationProperties baseProperties, @Nonnull Iterable<Header> headers)
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 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 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<ProxyConfiguration> getProxyConfiguration()
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<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 public io.vavr.control.Option<BasicCredentials> getBasicCredentials()
getBasicCredentials
in interface HttpDestinationProperties
Option
wrapping the BasicCredentials
to use, if any.@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.protected boolean canEqual(Object other)
Copyright © 2019 SAP SE. All rights reserved.