public class HttpConnectionOverHTTP2 extends HttpConnection implements Sweeper.Sweepable
Modifier and Type | Field and Description |
---|---|
private java.util.Set<HttpChannel> |
activeChannels |
private java.util.concurrent.atomic.AtomicBoolean |
closed |
private java.util.Queue<HttpChannelOverHTTP2> |
idleChannels |
private static Logger |
LOG |
private boolean |
recycleHttpChannels |
private Session |
session |
private java.util.concurrent.atomic.AtomicInteger |
sweeps |
Constructor and Description |
---|
HttpConnectionOverHTTP2(HttpDestination destination,
Session session) |
Modifier and Type | Method and Description |
---|---|
private void |
abort(java.lang.Throwable failure) |
protected HttpChannelOverHTTP2 |
acquireHttpChannel() |
void |
close() |
protected void |
close(java.lang.Throwable failure) |
Session |
getSession() |
boolean |
isClosed() |
boolean |
isRecycleHttpChannels() |
protected HttpChannelOverHTTP2 |
newHttpChannel() |
boolean |
onIdleTimeout(long idleTimeout) |
(package private) void |
onStreamClosed(IStream stream,
HttpChannelOverHTTP2 channel) |
protected void |
release(HttpChannelOverHTTP2 channel) |
protected SendFailure |
send(HttpExchange exchange) |
void |
setRecycleHttpChannels(boolean recycleHttpChannels) |
boolean |
sweep() |
java.lang.String |
toString() |
getHttpClient, getHttpDestination, normalizeRequest, send, send
private static final Logger LOG
private final java.util.Set<HttpChannel> activeChannels
private final java.util.Queue<HttpChannelOverHTTP2> idleChannels
private final java.util.concurrent.atomic.AtomicBoolean closed
private final java.util.concurrent.atomic.AtomicInteger sweeps
private final Session session
private boolean recycleHttpChannels
public HttpConnectionOverHTTP2(HttpDestination destination, Session session)
public Session getSession()
public boolean isRecycleHttpChannels()
public void setRecycleHttpChannels(boolean recycleHttpChannels)
protected SendFailure send(HttpExchange exchange)
send
in class HttpConnection
protected HttpChannelOverHTTP2 acquireHttpChannel()
protected HttpChannelOverHTTP2 newHttpChannel()
protected void release(HttpChannelOverHTTP2 channel)
void onStreamClosed(IStream stream, HttpChannelOverHTTP2 channel)
public boolean onIdleTimeout(long idleTimeout)
onIdleTimeout
in class HttpConnection
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface Connection
protected void close(java.lang.Throwable failure)
public boolean isClosed()
isClosed
in interface Connection
Connection.close()
private void abort(java.lang.Throwable failure)
public boolean sweep()
sweep
in interface Sweeper.Sweepable
public java.lang.String toString()
toString
in class HttpConnection