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

public Interface HttpClientConnection

extends HttpConnection
Known Direct Implementers
io.vertx.core.http.impl.Http1xClientConnection, io.vertx.core.http.impl.Http2ClientConnection, io.vertx.core.http.impl.Http2UpgradeClientConnection
Imports
io.netty.channel.Channel, .ChannelHandlerContext, io.vertx.core.AsyncResult, .Future, .Handler, io.vertx.core.http.HttpClientRequest, .HttpConnection, io.vertx.core.impl.ContextInternal, io.vertx.core.impl.logging.Logger, .LoggerFactory

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
public static final Handler<Long>
public static final Handler<Void>
public static final Logger

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the number of active streams
activeStreams
()

public Channel

Returns:

the connection channel
channel
()

public ChannelHandlerContext

Returns:

the ChannelHandlerContext of the handler managing the connection
channelHandlerContext
()

public long

Returns:

the connection concurrency
concurrency
()

public HttpClientConnection

Returns:

a reference to this, so the API can be used fluently
concurrencyChangeHandler
(Handler<Long>
the handler
handler
)

Set a handler called when the connection concurrency changes.

public Future<HttpClientRequest>

Returns:

a future notified with the created stream
createRequest
(ContextInternal
the stream context
context
)

Create an HTTP stream.

public void
createStream(ContextInternal
the stream context
context
,
Handler<AsyncResult<HttpClientStream>>
the handler called when the stream is created
handler
)

Create an HTTP stream.

public HttpClientConnection

Returns:

a reference to this, so the API can be used fluently
evictionHandler
(Handler<Void>
the handler
handler
)

Set a handler called when the connection should be evicted from a pool.

public ContextInternal
public boolean
public long

Returns:

the timestamp of the last received response - this is used for LIFO connection pooling
lastResponseReceivedTimestamp
()

public Object
Inherited from io.vertx.core.http.HttpConnection:
closeclosecloseHandlerexceptionHandlergetWindowSizegoAwaygoAwaygoAwaygoAwayHandlerindicatedServerNameisSsllocalAddresslocalAddresspeerCertificateChainpeerCertificatespingpingpingHandlerremoteAddressremoteAddressremoteSettingsremoteSettingsHandlersettingssetWindowSizeshutdownshutdownshutdownshutdownshutdownshutdownshutdownHandlersslSessionupdateSettingsupdateSettings

Field Detail

DEFAULT_CONCURRENCY_CHANGE_HANDLERback to summary
public static final Handler<Long> DEFAULT_CONCURRENCY_CHANGE_HANDLER
DEFAULT_EVICTION_HANDLERback to summary
public static final Handler<Void> DEFAULT_EVICTION_HANDLER
logback to summary
public static final Logger log

Method Detail

activeStreamsback to summary
public long activeStreams()
Returns:long

the number of active streams

channelback to summary
public Channel channel()
Returns:Channel

the connection channel

channelHandlerContextback to summary
public ChannelHandlerContext channelHandlerContext()
Returns:ChannelHandlerContext

the ChannelHandlerContext of the handler managing the connection

concurrencyback to summary
public long concurrency()
Returns:long

the connection concurrency

concurrencyChangeHandlerback to summary
public HttpClientConnection concurrencyChangeHandler(Handler<Long> handler)

Set a handler called when the connection concurrency changes. The handler is called with the new concurrency.

Parameters
handler:Handler<Long>

the handler

Returns:HttpClientConnection

a reference to this, so the API can be used fluently

createRequestback to summary
public Future<HttpClientRequest> createRequest(ContextInternal context)

Create an HTTP stream.

Parameters
context:ContextInternal

the stream context

Returns:Future<HttpClientRequest>

a future notified with the created stream

createStreamback to summary
public void createStream(ContextInternal context, Handler<AsyncResult<HttpClientStream>> handler)

Create an HTTP stream.

Parameters
context:ContextInternal

the stream context

handler:Handler<AsyncResult<HttpClientStream>>

the handler called when the stream is created

evictionHandlerback to summary
public HttpClientConnection evictionHandler(Handler<Void> handler)

Set a handler called when the connection should be evicted from a pool.

Parameters
handler:Handler<Void>

the handler

Returns:HttpClientConnection

a reference to this, so the API can be used fluently

getContextback to summary
public ContextInternal getContext()
isValidback to summary
public boolean isValid()
lastResponseReceivedTimestampback to summary
public long lastResponseReceivedTimestamp()
Returns:long

the timestamp of the last received response - this is used for LIFO connection pooling

metricback to summary
public Object metric()