public static class DefaultHttpDestination.Builder extends Object
DefaultHttpDestination
instance.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultHttpDestination.Builder |
authenticationType(AuthenticationType authenticationType)
Sets the expected authentication type of the
DefaultHttpDestination . |
DefaultHttpDestination.Builder |
basicCredentials(BasicCredentials basicCredentials)
Sets the credentials for accessing the destination when basic authentication is used.
|
DefaultHttpDestination |
build()
Finally creates the
DefaultHttpDestination with the properties retrieved via the
property(String, Object) method. |
DefaultHttpDestination.Builder |
header(Header header)
Adds the given header to the list of headers added to every outgoing request for this destination.
|
DefaultHttpDestination.Builder |
header(String headerName,
String headerValue)
Adds a header given by the
headerName and headerValue to the list of headers added to every
outgoing request for this destination. |
DefaultHttpDestination.Builder |
headerProviders(DestinationHeaderProvider... headerProviders)
Registers the provided
DestinationHeaderProvider instances on this Destination. |
DefaultHttpDestination.Builder |
keyStore(KeyStore keyStore)
Sets the
KeyStore to be used when communicating over HTTP. |
DefaultHttpDestination.Builder |
keyStorePassword(String value)
Sets the key store password for the corresponding
KeyStore used by the DefaultHttpDestination
to access the key store. |
DefaultHttpDestination.Builder |
name(String name)
Sets the name of the
DefaultHttpDestination . |
DefaultHttpDestination.Builder |
network(ProxyType proxyType)
Deprecated.
Use
proxyType(ProxyType) instead. |
DefaultHttpDestination.Builder |
password(String password)
Sets the password of the
DefaultHttpDestination . |
DefaultHttpDestination.Builder |
property(String key,
Object value)
Adds the given key-value pair to the destination to be created.
|
DefaultHttpDestination.Builder |
proxy(String proxyHost,
int proxyPort)
Sets the proxy host and proxy port of the
DefaultHttpDestination . |
DefaultHttpDestination.Builder |
proxy(URI proxyUri)
Sets the proxy URI of the
DefaultHttpDestination . |
DefaultHttpDestination.Builder |
proxyType(ProxyType proxyType)
Sets the proxy type (Internet or On-Premise).
|
DefaultHttpDestination.Builder |
securityConfiguration(SecurityConfigurationStrategy securityConfigurationStrategy)
Sets the
SecurityConfigurationStrategy for outbound calls via this Destination to decide if the
HttpSecuritySettings should be taken from the Destination Configuration or from the
CloudPlatform . |
DefaultHttpDestination.Builder |
tlsVersion(String value)
Sets the TLS version used by the
DefaultHttpDestination to the given value. |
DefaultHttpDestination.Builder |
trustAllCertificates()
Lets the
DefaultHttpDestination trust all server certificates. |
DefaultHttpDestination.Builder |
trustStore(KeyStore trustStore)
Sets the Trust Store to be used when communicating over HTTP.
|
DefaultHttpDestination.Builder |
uri(URI uri)
Deprecated.
The URI is already passed as a parameter to create the builder instance, hence deprecating this
method.
|
DefaultHttpDestination.Builder |
user(String user)
Sets the user name of the
DefaultHttpDestination . |
@Nonnull public DefaultHttpDestination.Builder property(@Nonnull String key, @Nonnull Object value)
key
- The key to assign a property for.value
- The property value to be assigned.@Nonnull public DefaultHttpDestination.Builder tlsVersion(@Nonnull String value)
DefaultHttpDestination
to the given value.value
- The TLS version that should be used.@Nonnull public DefaultHttpDestination.Builder keyStorePassword(@Nonnull String value)
KeyStore
used by the DefaultHttpDestination
to access the key store.value
- The keyStore password that should be used.@Nonnull public DefaultHttpDestination.Builder keyStore(@Nonnull KeyStore keyStore)
KeyStore
to be used when communicating over HTTP.keyStore
- The keyStore that should be used for HTTP communication@Nonnull public DefaultHttpDestination.Builder trustStore(@Nonnull KeyStore trustStore)
trustStore
- The Trust Store that should be used. for HTTP communication@Nonnull public DefaultHttpDestination.Builder trustAllCertificates()
DefaultHttpDestination
trust all server certificates.@Nonnull public DefaultHttpDestination.Builder name(@Nonnull String name)
DefaultHttpDestination
.name
- The destination name@Nonnull public DefaultHttpDestination.Builder proxy(@Nonnull URI proxyUri)
DefaultHttpDestination
.proxyUri
- The URI of the proxy@Deprecated @Nonnull public DefaultHttpDestination.Builder network(@Nonnull ProxyType proxyType)
proxyType(ProxyType)
instead.DefaultHttpDestination
.proxyType
- The network (i.e. "proxy type")@Nonnull public DefaultHttpDestination.Builder proxyType(@Nonnull ProxyType proxyType)
proxyType
- Type of proxy this destination is configured for.@Nonnull public DefaultHttpDestination.Builder proxy(@Nonnull String proxyHost, int proxyPort)
DefaultHttpDestination
.proxyHost
- The host of the proxyproxyPort
- The port of the proxy@Deprecated @Nonnull public DefaultHttpDestination.Builder uri(@Nonnull URI uri)
DefaultHttpDestination
.uri
- The URI of the destination@Nonnull public DefaultHttpDestination.Builder user(@Nonnull String user)
DefaultHttpDestination
.user
- The user name of the destination@Nonnull public DefaultHttpDestination.Builder password(@Nonnull String password)
DefaultHttpDestination
.password
- The password of the destination@Nonnull public DefaultHttpDestination.Builder basicCredentials(@Nonnull BasicCredentials basicCredentials)
basicCredentials
- Username and password represented as a BasicCredentials
object.@Nonnull public DefaultHttpDestination.Builder authenticationType(@Nonnull AuthenticationType authenticationType)
DefaultHttpDestination
.authenticationType
- The type of authentication forthe destination@Nonnull public DefaultHttpDestination.Builder header(@Nonnull Header header)
header
- A header to add to outgoing requests.@Nonnull public DefaultHttpDestination.Builder header(@Nonnull String headerName, @Nonnull String headerValue)
headerName
and headerValue
to the list of headers added to every
outgoing request for this destination.headerName
- The name of the header to add.headerValue
- The value of the header to add.@Beta @Nonnull public DefaultHttpDestination.Builder securityConfiguration(@Nonnull SecurityConfigurationStrategy securityConfigurationStrategy)
SecurityConfigurationStrategy
for outbound calls via this Destination to decide if the
HttpSecuritySettings
should be taken from the Destination Configuration or from the
CloudPlatform
.securityConfigurationStrategy
- The security configuration strategy to use@Nonnull public DefaultHttpDestination.Builder headerProviders(@Nonnull DestinationHeaderProvider... headerProviders)
DestinationHeaderProvider
instances on this Destination.
For all outgoing requests, the registered header providers are invoked and the returned headers
are added to the request.headerProviders
- The header provider instances@Nonnull public DefaultHttpDestination build()
DefaultHttpDestination
with the properties retrieved via the
property(String, Object)
method.DefaultHttpDestination
.Copyright © 2021 SAP SE. All rights reserved.