public abstract class AbstractHttpDestination extends Object implements HttpDestination
HttpDestination
interface that delegates all interface methods to a base
HttpDestinationProperties
object.Constructor and Description |
---|
AbstractHttpDestination(HttpDestinationProperties baseDestination) |
Modifier and Type | Method and Description |
---|---|
<ValueT> io.vavr.control.Option<ValueT> |
get(com.sap.cloud.sdk.cloudplatform.connectivity.DestinationPropertyKey<ValueT> propertyKey)
Convenience method to convert the
Object return type of DestinationProperties.get(String) into any expected type. |
io.vavr.control.Option<Object> |
get(String key)
Gets the value associated with the given key (if any).
|
<ValueT> io.vavr.control.Option<ValueT> |
get(String key,
Class<ValueT> expectedType)
Convenience method to cast the
Object return type of DestinationProperties.get(String) into the expected type. |
<ValueT> io.vavr.control.Option<ValueT> |
get(String key,
Function<Object,ValueT> conversion)
Convenience method to convert the
Object return type of DestinationProperties.get(String) into any expected type. |
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.
|
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. |
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. |
boolean |
isTrustingAllCertificates()
Indicates whether all server certificates should be accepted when communicating over HTTP.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decorate
public AbstractHttpDestination(HttpDestinationProperties baseDestination)
public URI getUri()
HttpDestinationProperties
URI
to communicate with.
This is a mandatory property of a HttpDestination.
getUri
in interface HttpDestinationProperties
URI
to be used with this destination.public io.vavr.control.Option<String> getTlsVersion()
HttpDestinationProperties
getTlsVersion
in interface HttpDestinationProperties
Option
wrapping the TLS version to use, if any.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.public io.vavr.control.Option<KeyStore> getKeyStore()
HttpDestinationProperties
getKeyStore
in interface HttpDestinationProperties
Option
wrapping the KeyStore to use, if any.public io.vavr.control.Option<String> getKeyStorePassword()
HttpDestinationProperties
getKeyStorePassword
in interface HttpDestinationProperties
Option
wrapping the password to use, if any.public boolean isTrustingAllCertificates()
HttpDestinationProperties
isTrustingAllCertificates
in interface HttpDestinationProperties
true
if all certificates should be accepted, false
otherwise.public io.vavr.control.Option<BasicCredentials> getBasicCredentials()
HttpDestinationProperties
getBasicCredentials
in interface HttpDestinationProperties
Option
wrapping the BasicCredentials
to use, if any.public AuthenticationType getAuthenticationType()
HttpDestinationProperties
getAuthenticationType
in interface HttpDestinationProperties
public io.vavr.control.Option<ProxyType> getProxyType()
HttpDestinationProperties
ProxyType
that is configured for this destination.getProxyType
in interface HttpDestinationProperties
Option
wrapping the ProxyType
to use, if any.public io.vavr.control.Option<KeyStore> getTrustStore()
getTrustStore
in interface HttpDestinationProperties
public io.vavr.control.Option<String> getTrustStorePassword()
getTrustStorePassword
in interface HttpDestinationProperties
public Collection<Header> getHeaders(URI requestUri)
HttpDestinationProperties
getHeaders
in interface HttpDestinationProperties
requestUri
- The target URI of a request to which HTTP headers should be added.public io.vavr.control.Option<Object> get(String key)
DestinationProperties
get
in interface DestinationProperties
key
- The key to get the value for.Option
object containing the value, if any.public Iterable<String> getPropertyNames()
DestinationProperties
getPropertyNames
in interface DestinationProperties
public <ValueT> io.vavr.control.Option<ValueT> get(String key, Class<ValueT> expectedType)
DestinationProperties
Object
return type of DestinationProperties.get(String)
into the expected type.get
in interface DestinationProperties
ValueT
- The expected type of the value.key
- The key to get the value for.expectedType
- The expected type to cast the value to.Option
object containing the converted value, if any.public <ValueT> io.vavr.control.Option<ValueT> get(String key, Function<Object,ValueT> conversion)
DestinationProperties
Object
return type of DestinationProperties.get(String)
into any expected type.get
in interface DestinationProperties
ValueT
- The expected type of the value.key
- The key to get the value for.conversion
- A function converting the object given by DestinationProperties.get(String)
into the expected type. Will never be
called if no value (or null
) is present for the given key.Option
object containing the converted value, if any.public <ValueT> io.vavr.control.Option<ValueT> get(com.sap.cloud.sdk.cloudplatform.connectivity.DestinationPropertyKey<ValueT> propertyKey)
DestinationProperties
Object
return type of DestinationProperties.get(String)
into any expected type.get
in interface DestinationProperties
ValueT
- The expected type of the value.propertyKey
- The DestinationPropertyKey
for the value to retrieve.Option
object containing the converted value, if any.Copyright © 2020 SAP SE. All rights reserved.