Package io.vertx.core.http
Interface HttpClientConnection
-
- All Superinterfaces:
HttpClient,HttpConnection
@Unstable public interface HttpClientConnection extends HttpConnection, HttpClient
Represents an HTTP client connection.You can use this connection to create requests to the connected server.
Depending on the nature of the connection, requests might just be sent to the server or might be queued until a connection request is available.
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longactiveStreams()default Future<Void>close()Close immediately (shutdown(0, TimeUnit.SECONDS).longmaxActiveStreams()default Future<Void>shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>shutdown(long timeout, TimeUnit unit)Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeoutthe connection will be closed.-
Methods inherited from interface io.vertx.core.http.HttpClient
request, request, request, request, request
-
Methods inherited from interface io.vertx.core.http.HttpConnection
closeHandler, exceptionHandler, getWindowSize, goAway, goAway, goAway, goAwayHandler, indicatedServerName, isSsl, localAddress, localAddress, peerCertificates, ping, pingHandler, remoteAddress, remoteAddress, remoteSettings, remoteSettingsHandler, settings, setWindowSize, shutdownHandler, sslSession, updateSettings
-
-
-
-
Method Detail
-
activeStreams
long activeStreams()
- Returns:
- the number of active request/response (streams)
-
maxActiveStreams
long maxActiveStreams()
- Returns:
- the max number of concurrent active streams this connection can handle
-
shutdown
default Future<Void> shutdown()
Description copied from interface:HttpConnectionShutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).- Specified by:
shutdownin interfaceHttpClient- Specified by:
shutdownin interfaceHttpConnection- Returns:
- a future completed when shutdown has completed
-
shutdown
Future<Void> shutdown(long timeout, TimeUnit unit)
Description copied from interface:HttpConnectionInitiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeoutthe connection will be closed. Client connection are immediately removed from the pool.- HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close.
- HTTP/1.x connection will be closed.
- Specified by:
shutdownin interfaceHttpClient- Specified by:
shutdownin interfaceHttpConnection- Parameters:
timeout- the amount of time after which all resources are forcibly closedunit- the of the timeout- Returns:
- a future completed when shutdown has completed
-
close
default Future<Void> close()
Description copied from interface:HttpConnectionClose immediately (shutdown(0, TimeUnit.SECONDS).- Specified by:
closein interfaceHttpClient- Specified by:
closein interfaceHttpConnection- Returns:
- a future notified when the client is closed
-
-