@Generated(value="org.immutables.processor.ProxyProcessor") public final class DefaultConnectionContext extends Object
ConnectionContext interface. This is the implementation that should be used for most non-testing cases.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultConnectionContext.Builder
Builds instances of type
DefaultConnectionContext. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultConnectionContext.Builder |
builder()
Creates a builder for
DefaultConnectionContext. |
void |
dispose()
Disposes resources created to service this connection context
|
boolean |
equals(Object another)
This instance is equal to all instances of
DefaultConnectionContext that have equal attribute values. |
String |
getApiHost()
The hostname of the API root.
|
Optional<Duration> |
getCacheDuration()
The duration that stable responses like the payload of the API root should be cached
|
Integer |
getConnectionPoolSize()
The number of connections to use when processing requests and responses.
|
Optional<reactor.netty.resources.ConnectionProvider> |
getConnectionProvider() |
Optional<Duration> |
getConnectTimeout()
The
CONNECT_TIMEOUT_MILLIS value |
reactor.netty.http.client.HttpClient |
getHttpClient()
The
HttpClient to use |
Optional<Boolean> |
getKeepAlive()
The
SO_KEEPALIVE value |
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
The
ObjectMapper to use |
Optional<Integer> |
getPort()
The port for the Cloud Foundry instance.
|
List<com.fasterxml.jackson.databind.deser.DeserializationProblemHandler> |
getProblemHandlers()
Jackson deserialization problem handlers.
|
Optional<ProxyConfiguration> |
getProxyConfiguration()
The (optional) proxy configuration
|
RootProvider |
getRootProvider()
The
RootProvider to use |
Optional<Boolean> |
getSecure()
Whether the connection to the root API should be secure (i.e.
|
Optional<Boolean> |
getSkipSslValidation()
Whether to skip SSL certificate validation for all hosts reachable from the API host.
|
Optional<org.cloudfoundry.reactor.util.SslCertificateTruster> |
getSslCertificateTruster() |
Optional<Duration> |
getSslCloseNotifyFlushTimeout()
The timeout for the SSL close notify flush
|
Optional<Duration> |
getSslCloseNotifyReadTimeout()
THe timeout for the SSL close notify read
|
Optional<Duration> |
getSslHandshakeTimeout()
The timeout for the SSL handshake negotiation
|
reactor.netty.resources.LoopResources |
getThreadPool() |
Integer |
getThreadPoolSize()
The number of worker threads to use when processing requests and responses
|
int |
hashCode()
Computes a hash code from attributes:
cacheDuration, connectionPoolSize, httpClient, objectMapper, rootProvider, threadPoolSize, apiHost, connectTimeout, connectionProvider, keepAlive, port, problemHandlers, proxyConfiguration, secure, skipSslValidation, sslCertificateTruster, sslCloseNotifyFlushTimeout, sslCloseNotifyReadTimeout, sslHandshakeTimeout, threadPool. |
String |
toString()
Prints the immutable value
DefaultConnectionContext with attribute values. |
reactor.core.publisher.Mono<Void> |
trust(String host,
int port)
Attempt to explicitly trust the TLS certificate of an endpoint.
|
public Optional<Duration> getCacheDuration()
ConnectionContextgetCacheDuration in interface ConnectionContextcacheDuration attributepublic Integer getConnectionPoolSize()
null disables connection pooling.public reactor.netty.http.client.HttpClient getHttpClient()
ConnectionContextHttpClient to usegetHttpClient in interface ConnectionContexthttpClient attributepublic com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ConnectionContextObjectMapper to usegetObjectMapper in interface ConnectionContextobjectMapper attributepublic RootProvider getRootProvider()
ConnectionContextRootProvider to usegetRootProvider in interface ConnectionContextrootProvider attributepublic Integer getThreadPoolSize()
public String getApiHost()
api.run.pivotal.io.public Optional<reactor.netty.resources.ConnectionProvider> getConnectionProvider()
connectionProvider attributepublic Optional<Integer> getPort()
443.public List<com.fasterxml.jackson.databind.deser.DeserializationProblemHandler> getProblemHandlers()
public Optional<ProxyConfiguration> getProxyConfiguration()
public Optional<Boolean> getSecure()
true.public Optional<Boolean> getSkipSslValidation()
false.public Optional<org.cloudfoundry.reactor.util.SslCertificateTruster> getSslCertificateTruster()
sslCertificateTruster attributepublic Optional<Duration> getSslCloseNotifyFlushTimeout()
public Optional<Duration> getSslCloseNotifyReadTimeout()
public Optional<Duration> getSslHandshakeTimeout()
public reactor.netty.resources.LoopResources getThreadPool()
threadPool attributepublic boolean equals(Object another)
DefaultConnectionContext that have equal attribute values.public int hashCode()
cacheDuration, connectionPoolSize, httpClient, objectMapper, rootProvider, threadPoolSize, apiHost, connectTimeout, connectionProvider, keepAlive, port, problemHandlers, proxyConfiguration, secure, skipSslValidation, sslCertificateTruster, sslCloseNotifyFlushTimeout, sslCloseNotifyReadTimeout, sslHandshakeTimeout, threadPool.public String toString()
DefaultConnectionContext with attribute values.public static DefaultConnectionContext.Builder builder()
DefaultConnectionContext.
DefaultConnectionContext.builder()
.cacheDuration(java.time.Duration) // optional cacheDuration
.connectionPoolSize(Integer | null) // nullable connectionPoolSize
.httpClient(reactor.netty.http.client.HttpClient) // optional httpClient
.objectMapper(com.fasterxml.jackson.databind.ObjectMapper) // optional objectMapper
.rootProvider(org.cloudfoundry.reactor.RootProvider) // optional rootProvider
.threadPoolSize(Integer) // optional threadPoolSize
.apiHost(String) // required apiHost
.connectTimeout(java.time.Duration) // optional connectTimeout
.keepAlive(Boolean) // optional keepAlive
.port(Integer) // optional port
.problemHandler|addAllProblemHandlers(com.fasterxml.jackson.databind.deser.DeserializationProblemHandler) // problemHandlers elements
.proxyConfiguration(ProxyConfiguration) // optional proxyConfiguration
.secure(Boolean) // optional secure
.skipSslValidation(Boolean) // optional skipSslValidation
.sslCloseNotifyFlushTimeout(java.time.Duration) // optional sslCloseNotifyFlushTimeout
.sslCloseNotifyReadTimeout(java.time.Duration) // optional sslCloseNotifyReadTimeout
.sslHandshakeTimeout(java.time.Duration) // optional sslHandshakeTimeout
.build();
@PreDestroy public final void dispose()
public reactor.core.publisher.Mono<Void> trust(String host, int port)
ConnectionContexttrust in interface ConnectionContexthost - the host of the endpoint to trustport - the port of the endpoint to trustCopyright © 2019. All rights reserved.