Package io.micronaut.http.client.netty
Class ConnectionManager.PoolHandle
java.lang.Object
io.micronaut.http.client.netty.ConnectionManager.PoolHandle
- Enclosing class:
- ConnectionManager
Handle for a pooled connection. One pool handle generally corresponds to one request, and
once the request and response are done, the handle is
released
and a new
request can claim the same connection.-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Whether this connection may be returned to a connection pool (i.e.final io.netty.channel.Channel
channel()
final boolean
http2()
abstract void
Notify anyNettyClientCustomizer
that the request pipeline has been built.void
release()
Close this connection or release it back to the pool.abstract void
taint()
Prevent this connection from being reused, e.g.
-
Method Details
-
channel
public final io.netty.channel.Channel channel() -
http2
public final boolean http2() -
taint
public abstract void taint()Prevent this connection from being reused, e.g. because garbage was written because of an error. -
release
public void release()Close this connection or release it back to the pool. -
canReturn
public abstract boolean canReturn()Whether this connection may be returned to a connection pool (i.e. should be kept keepalive).- Returns:
- Whether this connection may be reused
-
notifyRequestPipelineBuilt
public abstract void notifyRequestPipelineBuilt()Notify anyNettyClientCustomizer
that the request pipeline has been built.
-