Top Description Fields Constructors Methods
io.vertx.core.http.impl

public Class HttpClientBase

extends Object
implements MetricsProvider, Closeable
Class Inheritance
All Implemented Interfaces
io.vertx.core.Closeable, io.vertx.core.spi.metrics.MetricsProvider, io.vertx.core.metrics.Measured
Known Direct Subclasses
io.vertx.core.http.impl.HttpClientImpl, io.vertx.core.http.impl.WebSocketClientImpl
Imports
io.vertx.core.*, io.vertx.core.http.*, io.vertx.core.impl.CloseFuture, .ContextInternal, .VertxInternal, io.vertx.core.impl.future.PromiseInternal, io.vertx.core.net.*, io.vertx.core.net.impl.NetClientBuilder, .NetClientImpl, .ProxyFilter, io.vertx.core.net.impl.pool.*, io.vertx.core.spi.metrics.ClientMetrics, .HttpClientMetrics, .Metrics, .MetricsProvider, java.util.*, java.util.concurrent.atomic.AtomicInteger, java.util.function.Function, .Predicate, java.util.stream.Collectors

This class is thread-safe.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
protected final CloseFuture
private final Function<ContextInternal, ContextInternal>
private final boolean
protected final HttpClientMetrics<R, W, S, T>
protected final NetClientImpl
protected final HttpClientOptions
private final boolean
private Predicate<SocketAddress>
pack-priv final boolean
protected final VertxInternal
private final ConnectionManager<EndpointKey, HttpClientConnection>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close(Promise<Void>
the promise to signal when close has completed
completion
)

Implements io.vertx.core.Closeable.close.

Close this resource, the completion promise must be notified when the operation has completed.

public void
public Future<Void>
pack-priv Function<ContextInternal, ContextInternal>
protected final String
public Metrics
getMetrics()

Implements io.vertx.core.spi.metrics.MetricsProvider.getMetrics.

Returns the metrics implementation.

protected final int
private ProxyOptions
public boolean
isMetricsEnabled()

Overrides default io.vertx.core.metrics.Measured.isMetricsEnabled.

Whether the metrics are enabled for this measured object

pack-priv HttpClientMetrics<R, W, S, T>
public NetClient
public HttpClientOptions
public HttpClientBase
protected final ProxyOptions
public Future<Boolean>
updateSSLOptions(SSLOptions options, boolean force)

public VertxInternal
public void
private void
public Future<WebSocket>
webSocket(int port, String host, String requestURI)

public Future<WebSocket>
webSocket(String host, String requestURI)

public Future<WebSocket>
webSocket(String requestURI)

public Future<WebSocket>
public void
webSocket(int port, String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)

public void
webSocket(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)

public void
webSocket(String requestURI, Handler<AsyncResult<WebSocket>> handler)

public Future<WebSocket>
webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols)

public void
webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols, Handler<AsyncResult<WebSocket>> handler)

private ConnectionManager<EndpointKey, HttpClientConnection>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closeFutureback to summary
protected final CloseFuture closeFuture
contextProviderback to summary
private final Function<ContextInternal, ContextInternal> contextProvider
keepAliveback to summary
private final boolean keepAlive
metricsback to summary
protected final HttpClientMetrics<R, W, S, T> metrics
netClientback to summary
protected final NetClientImpl netClient
optionsback to summary
protected final HttpClientOptions options
pipeliningback to summary
private final boolean pipelining
proxyFilterback to summary
private Predicate<SocketAddress> proxyFilter
useH2UniformStreamByteDistributorback to summary
pack-priv final boolean useH2UniformStreamByteDistributor
vertxback to summary
protected final VertxInternal vertx
webSocketCMback to summary
private final ConnectionManager<EndpointKey, HttpClientConnection> webSocketCM

Constructor Detail

HttpClientBaseback to summary
public HttpClientBase(VertxInternal vertx, HttpClientOptions options, CloseFuture closeFuture)

Method Detail

closeback to summary
public void close(Promise<Void> completion)

Implements io.vertx.core.Closeable.close.

Doc from io.vertx.core.Closeable.close.

Close this resource, the completion promise must be notified when the operation has completed.

Parameters
completion:Promise<Void>

the promise to signal when close has completed

Annotations
@Override
closeback to summary
public void close(Handler<AsyncResult<Void>> handler)
closeback to summary
public Future<Void> close()
contextProviderback to summary
pack-priv Function<ContextInternal, ContextInternal> contextProvider()
getHostback to summary
protected final String getHost(RequestOptions request)
getMetricsback to summary
public Metrics getMetrics()

Implements io.vertx.core.spi.metrics.MetricsProvider.getMetrics.

Doc from io.vertx.core.spi.metrics.MetricsProvider.getMetrics.

Returns the metrics implementation.

Returns:Metrics

the metrics

Annotations
@Override
getPortback to summary
protected final int getPort(RequestOptions request)
getProxyOptionsback to summary
private ProxyOptions getProxyOptions(ProxyOptions proxyOptions)
isMetricsEnabledback to summary
public boolean isMetricsEnabled()

Overrides default io.vertx.core.metrics.Measured.isMetricsEnabled.

Doc from io.vertx.core.metrics.Measured.isMetricsEnabled.

Whether the metrics are enabled for this measured object

Returns:boolean

true if metrics are enabled

Annotations
@Override
metricsback to summary
pack-priv HttpClientMetrics<R, W, S, T> metrics()
netClientback to summary
public NetClient netClient()
optionsback to summary
public HttpClientOptions options()
proxyFilterback to summary
public HttpClientBase proxyFilter(Predicate<SocketAddress> filter)
resolveProxyOptionsback to summary
protected final ProxyOptions resolveProxyOptions(ProxyOptions proxyOptions, SocketAddress addr)
updateSSLOptionsback to summary
public Future<Boolean> updateSSLOptions(SSLOptions options, boolean force)
vertxback to summary
public VertxInternal vertx()
webSocketback to summary
public void webSocket(WebSocketConnectOptions connectOptions, Handler<AsyncResult<WebSocket>> handler)
webSocketback to summary
private void webSocket(WebSocketConnectOptions connectOptions, PromiseInternal<WebSocket> promise)
webSocketback to summary
public Future<WebSocket> webSocket(int port, String host, String requestURI)
webSocketback to summary
public Future<WebSocket> webSocket(String host, String requestURI)
webSocketback to summary
public Future<WebSocket> webSocket(String requestURI)
webSocketback to summary
public Future<WebSocket> webSocket(WebSocketConnectOptions options)
webSocketback to summary
public void webSocket(int port, String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
webSocketback to summary
public void webSocket(String host, String requestURI, Handler<AsyncResult<WebSocket>> handler)
webSocketback to summary
public void webSocket(String requestURI, Handler<AsyncResult<WebSocket>> handler)
webSocketAbsback to summary
public Future<WebSocket> webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols)
webSocketAbsback to summary
public void webSocketAbs(String url, MultiMap headers, WebsocketVersion version, List<String> subProtocols, Handler<AsyncResult<WebSocket>> handler)
webSocketConnectionManagerback to summary
private ConnectionManager<EndpointKey, HttpClientConnection> webSocketConnectionManager()