Top Description Fields Constructors Methods
reactor.netty.http.client

pack-priv final Class HttpConnectionProvider

extends Object
implements ConnectionProvider
Class Inheritance
All Implemented Interfaces
reactor.netty.resources.ConnectionProvider, reactor.core.Disposable
Imports
io.netty.resolver.AddressResolverGroup, reactor.core.publisher.Mono, reactor.netty.Connection, .ConnectionObserver, reactor.netty.http.HttpResources, reactor.netty.resources.ConnectionProvider, reactor.netty.transport.TransportConfig, reactor.util.annotation.Nullable, java.net.SocketAddress, java.util.Map, java.util.concurrent.atomic.AtomicReference, java.util.function.Function, .Supplier

ConnectionProvider for HTTP protocol.
Author
Violeta Georgieva
Since
1.0.0

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicReference<ConnectionProvider>
pack-priv final ConnectionProvider
pack-priv static final Function<ConnectionProvider, ConnectionProvider>

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
HttpConnectionProvider(ConnectionProvider http1ConnectionProvider)

Method Summary

Modifier and TypeMethod and Description
public Mono<? extends Connection>
acquire(TransportConfig
the transport configuration
config
,
ConnectionObserver connectionObserver, Supplier<? extends SocketAddress>
the SocketAddress to connect to
remoteAddress
,
AddressResolverGroup<?>
the resolver which will resolve the address of the unresolved named address
resolverGroup
)

Implements reactor.netty.resources.ConnectionProvider.acquire.

Return an existing or new Connection on subscribe.
public void
disposeWhen(SocketAddress
the remote address
address
)

Overrides default reactor.netty.resources.ConnectionProvider.disposeWhen.

Dispose all connection pools for the specified remote address.
pack-priv ConnectionProvider
pack-priv ConnectionProvider
public int
maxConnections()

Overrides default reactor.netty.resources.ConnectionProvider.maxConnections.

Returns the maximum number of connections before starting pending.
public Map<SocketAddress, Integer>
maxConnectionsPerHost()

Overrides default reactor.netty.resources.ConnectionProvider.maxConnectionsPerHost.

Returns the maximum number of connections per host before starting pending.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

h2ConnectionProviderback to summary
pack-priv final AtomicReference<ConnectionProvider> h2ConnectionProvider
http1ConnectionProviderback to summary
pack-priv final ConnectionProvider http1ConnectionProvider
HTTP2_CONNECTION_PROVIDER_FACTORYback to summary
pack-priv static final Function<ConnectionProvider, ConnectionProvider> HTTP2_CONNECTION_PROVIDER_FACTORY

Constructor Detail

HttpConnectionProviderback to summary
pack-priv HttpConnectionProvider()
HttpConnectionProviderback to summary
pack-priv HttpConnectionProvider(ConnectionProvider http1ConnectionProvider)

Method Detail

acquireback to summary
public Mono<? extends Connection> acquire(TransportConfig config, ConnectionObserver connectionObserver, Supplier<? extends SocketAddress> remoteAddress, AddressResolverGroup<?> resolverGroup)

Implements reactor.netty.resources.ConnectionProvider.acquire.

Doc from reactor.netty.resources.ConnectionProvider.acquire.

Return an existing or new Connection on subscribe.

Parameters
config:TransportConfig

the transport configuration

connectionObserver:ConnectionObserver

the ConnectionObserver

remoteAddress:Supplier<? extends SocketAddress>

the SocketAddress to connect to

resolverGroup:AddressResolverGroup<?>

the resolver which will resolve the address of the unresolved named address

Returns:Mono<? extends Connection>

an existing or new Mono of Connection

Annotations
@Override
disposeWhenback to summary
public void disposeWhen(SocketAddress address)

Overrides default reactor.netty.resources.ConnectionProvider.disposeWhen.

Doc from reactor.netty.resources.ConnectionProvider.disposeWhen.

Dispose all connection pools for the specified remote address.

This method has NOOP default implementation. ConnectionProvider implementations may decide to provide more specific implementation.

Parameters
address:SocketAddress

the remote address

Annotations
@Override
getOrCreateback to summary
pack-priv ConnectionProvider getOrCreate()
http1ConnectionProviderback to summary
pack-priv ConnectionProvider http1ConnectionProvider()
maxConnectionsback to summary
public int maxConnections()

Overrides default reactor.netty.resources.ConnectionProvider.maxConnections.

Doc from reactor.netty.resources.ConnectionProvider.maxConnections.

Returns the maximum number of connections before starting pending.

Returns:int

the maximum number of connections before starting pending

Annotations
@Override
maxConnectionsPerHostback to summary
public Map<SocketAddress, Integer> maxConnectionsPerHost()

Overrides default reactor.netty.resources.ConnectionProvider.maxConnectionsPerHost.

Doc from reactor.netty.resources.ConnectionProvider.maxConnectionsPerHost.

Returns the maximum number of connections per host before starting pending.

Returns:Map<SocketAddress, Integer>

the maximum number of connections per host before starting pending

Annotations
@Override