Class TransparentProxyDestination
java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.TransparentProxyDestination
- All Implemented Interfaces:
Destination,DestinationProperties,HttpDestination,HttpDestinationProperties
* Immutable implementation of the
HttpDestination interface for using the
transparent
proxy.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTransparentProxyDestination.AbstractBuilder<B extends TransparentProxyDestination.AbstractBuilder<B>>Abstract base class for builders to share common functionality like adding headers and properties.static final classBuilder for creating a destinationTransparentProxyDestination.static final classBuilder for creating a destination-gatewayTransparentProxyDestination. -
Method Summary
Modifier and TypeMethodDescriptiondestination(String uri) Creates a new builder for a destination.booleanCreates a new builder for a destination-gateway.<ValueT> io.vavr.control.Option<ValueT>get(DestinationPropertyKey<ValueT> propertyKey) Convenience method to convert theObjectreturn type ofDestinationProperties.get(String)into any expected type.io.vavr.control.Option<Object>Gets the value associated with the given key (if any).<ValueT> io.vavr.control.Option<ValueT>Convenience method to cast theObjectreturn type ofDestinationProperties.get(String)into the expected type.<ValueT> io.vavr.control.Option<ValueT>Convenience method to convert theObjectreturn type ofDestinationProperties.get(String)into any expected type.Returns the authentication type to be expected when authenticating at the remote system.io.vavr.control.Option<BasicCredentials>Returns the basic credentials to be used for authentication at the remote system.getHeaders(URI requestUri) Getter for a collection of headers that should be added to the outgoing request for this destination.io.vavr.control.Option<KeyStore>The KeyStore to be used when communicating over HTTP.io.vavr.control.Option<String>The password for the Key Store to be used when communicating over HTTP.Retrieves the set of property keys of the destination.io.vavr.control.Option<ProxyConfiguration>TheProxyConfigurationto be used when communicating over HTTP.io.vavr.control.Option<ProxyType>Returns theProxyTypethat is configured for this destination.io.vavr.control.Option<String>The TLS version to be used when communicating over HTTP.io.vavr.control.Option<KeyStore>Returns the optional trust store of the destination.io.vavr.control.Option<String>Returns the optional trust store password of the destination.getUri()Getter for theURIto communicate with.inthashCode()booleanIndicates whether all server certificates should be accepted when communicating over HTTP.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.cloud.sdk.cloudplatform.connectivity.Destination
asHttp, asRfc, isHttp, isRfcMethods inherited from interface com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestinationProperties
getHeaders, getSecurityConfigurationStrategy
-
Method Details
-
getUri
Description copied from interface:HttpDestinationPropertiesGetter for theURIto communicate with.This is a mandatory property of a HttpDestination.
- Specified by:
getUriin interfaceHttpDestinationProperties- Returns:
- The
URIto be used with this destination.
-
getHeaders
Description copied from interface:HttpDestinationPropertiesGetter for a collection of headers that should be added to the outgoing request for this destination.- Specified by:
getHeadersin interfaceHttpDestinationProperties- Parameters:
requestUri- The target URI of a request to which HTTP headers should be added.- Returns:
- A collection with all headers to be used when communicating with the target of the destination.
-
getTlsVersion
Description copied from interface:HttpDestinationPropertiesThe TLS version to be used when communicating over HTTP.- Specified by:
getTlsVersionin interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping the TLS version to use, if any.
-
getProxyConfiguration
Description copied from interface:HttpDestinationPropertiesTheProxyConfigurationto be used when communicating over HTTP.- Specified by:
getProxyConfigurationin interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping theProxyConfigurationto use, if any.
-
getKeyStore
Description copied from interface:HttpDestinationPropertiesThe KeyStore to be used when communicating over HTTP.- Specified by:
getKeyStorein interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping the KeyStore to use, if any.
-
getKeyStorePassword
Description copied from interface:HttpDestinationPropertiesThe password for the Key Store to be used when communicating over HTTP.- Specified by:
getKeyStorePasswordin interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping the password to use, if any.
-
isTrustingAllCertificates
public boolean isTrustingAllCertificates()Description copied from interface:HttpDestinationPropertiesIndicates whether all server certificates should be accepted when communicating over HTTP.- Specified by:
isTrustingAllCertificatesin interfaceHttpDestinationProperties- Returns:
trueif all certificates should be accepted,falseotherwise.
-
getBasicCredentials
Description copied from interface:HttpDestinationPropertiesReturns the basic credentials to be used for authentication at the remote system.- Specified by:
getBasicCredentialsin interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping theBasicCredentialsto use, if any.
-
getAuthenticationType
Description copied from interface:HttpDestinationPropertiesReturns the authentication type to be expected when authenticating at the remote system.- Specified by:
getAuthenticationTypein interfaceHttpDestinationProperties- Returns:
- This destination authentication type.
-
getProxyType
Description copied from interface:HttpDestinationPropertiesReturns theProxyTypethat is configured for this destination.- Specified by:
getProxyTypein interfaceHttpDestinationProperties- Returns:
- An
Optionwrapping theProxyTypeto use, if any.
-
getTrustStore
Description copied from interface:HttpDestinationPropertiesReturns the optional trust store of the destination.- Specified by:
getTrustStorein interfaceHttpDestinationProperties- Returns:
- The optional trust store of the destination.
-
getTrustStorePassword
Description copied from interface:HttpDestinationPropertiesReturns the optional trust store password of the destination.- Specified by:
getTrustStorePasswordin interfaceHttpDestinationProperties- Returns:
- The optional trust store password of the destination.
-
equals
-
hashCode
public int hashCode() -
destination
Creates a new builder for a destination.A destination connects directly to a specified URL and does not use the destination-gateway. It allows setting generic headers but does not support gateway-specific properties like destination name or fragments.
- Returns:
- A new
TransparentProxyDestination.Builderinstance.
-
gateway
@Nonnull public static TransparentProxyDestination.GatewayBuilder gateway(@Nonnull String destinationName, @Nonnull String uri) Creates a new builder for a destination-gateway.A destination-gateway requires a destination name and will be routed through the central destination-gateway. It supports all gateway-specific properties like fragments, tenant context, and authentication flows.
- Parameters:
destinationName- The name of the destination to be resolved by the gateway.- Returns:
- A new
TransparentProxyDestination.GatewayBuilderinstance.
-
get
Description copied from interface:DestinationPropertiesGets the value associated with the given key (if any).- Specified by:
getin interfaceDestinationProperties- Parameters:
arg0- The key to get the value for.- Returns:
- An
Optionobject containing the value, if any.
-
getPropertyNames
Description copied from interface:DestinationPropertiesRetrieves the set of property keys of the destination.- Specified by:
getPropertyNamesin interfaceDestinationProperties- Returns:
- An iterable of type String which is the set of property keys for a destination
-
get
Description copied from interface:DestinationPropertiesConvenience method to cast theObjectreturn type ofDestinationProperties.get(String)into the expected type.- Specified by:
getin interfaceDestinationProperties- Type Parameters:
ValueT- The expected type of the value.- Parameters:
key- The key to get the value for.expectedType- The expected type to cast the value to.- Returns:
- An
Optionobject containing the converted value, if any.
-
get
Description copied from interface:DestinationPropertiesConvenience method to convert theObjectreturn type ofDestinationProperties.get(String)into any expected type.- Specified by:
getin interfaceDestinationProperties- Type Parameters:
ValueT- The expected type of the value.- Parameters:
key- The key to get the value for.conversion- A function converting the object given byDestinationProperties.get(String)into the expected type. Will never be called if no value (ornull) is present for the given key.- Returns:
- An
Optionobject containing the converted value, if any.
-
get
Description copied from interface:DestinationPropertiesConvenience method to convert theObjectreturn type ofDestinationProperties.get(String)into any expected type.- Specified by:
getin interfaceDestinationProperties- Type Parameters:
ValueT- The expected type of the value.- Parameters:
propertyKey- TheDestinationPropertyKeyfor the value to retrieve.- Returns:
- An
Optionobject containing the converted value, if any.
-