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 booleanWhether this connection may be returned to a connection pool (i.e.final io.netty.channel.Channelchannel()final booleanhttp2()abstract voidNotify anyNettyClientCustomizerthat the request pipeline has been built.voidrelease()Close this connection or release it back to the pool.abstract voidtaint()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 anyNettyClientCustomizerthat the request pipeline has been built.
-