java.lang.Object
io.helidon.webserver.http2.Http2Connection
- All Implemented Interfaces:
- InterruptableTask<Void>,- ServerConnection,- Runnable,- Callable<Void>
HTTP/2 server connection.
 A single connection is created between a client and a server.
 A single connection serves multiple streams.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanSignals if a task can be interrupted at the time this method is called.voidclientSettings(Http2Settings http2Settings) Client settings, obtained from SETTINGS frame or HTTP/2 upgrade request.voidclose(boolean interrupt) Close a connection.voidExpect connection preface (prior knowledge).voidStart handling the connection.voidStart handling the connection.idleTime()How long is this connection idle.toString()voidupgradeConnectionData(HttpPrologue prologue, Http2Headers headers) Connection headers from an upgrade request from HTTP/1.1.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.common.task.InterruptableTaskcall, run
- 
Method Details- 
handleDescription copied from interface:ServerConnectionStart handling the connection. Data is provided throughServerConnectionSelector.connection(io.helidon.webserver.ConnectionContext).- Specified by:
- handlein interface- ServerConnection
- Parameters:
- limit- that is responsible for maximal concurrent request limit, the connection implementation is responsible invoking each request within the limit's- LimitAlgorithm.invoke(java.util.concurrent.Callable)
- Throws:
- InterruptedException- to interrupt any waiting state and terminate this connection
 
- 
handleDescription copied from interface:ServerConnectionStart handling the connection. Data is provided throughServerConnectionSelector.connection(io.helidon.webserver.ConnectionContext).- Specified by:
- handlein interface- ServerConnection
- Parameters:
- requestSemaphore- semaphore that is responsible for maximal concurrent request limit, the connection implementation is responsible for acquiring a permit from the semaphore for the duration of a request, and releasing it when the request ends; please be very careful, as this may lead to complete stop of the server if incorrectly implemented
- Throws:
- InterruptedException- to interrupt any waiting state and terminate this connection
 
- 
clientSettingsClient settings, obtained from SETTINGS frame or HTTP/2 upgrade request.- Parameters:
- http2Settings- client settings to use
 
- 
upgradeConnectionDataConnection headers from an upgrade request from HTTP/1.1.- Parameters:
- prologue- prologue of the HTTP/2 request
- headers- headers to use for first stream (obtained from original HTTP/1.1 request)
 
- 
expectPrefacepublic void expectPreface()Expect connection preface (prior knowledge).
- 
canInterruptpublic boolean canInterrupt()Description copied from interface:InterruptableTaskSignals if a task can be interrupted at the time this method is called.- Specified by:
- canInterruptin interface- InterruptableTask<Void>
- Returns:
- outcome of interruptable test
 
- 
toString
- 
idleTimeDescription copied from interface:ServerConnectionHow long is this connection idle. This is a duration from the last request to now.- Specified by:
- idleTimein interface- ServerConnection
- Returns:
- idle duration
 
- 
closepublic void close(boolean interrupt) Description copied from interface:ServerConnectionClose a connection. This may be called during shutdown of the server, or when idle timeout is reached.- Specified by:
- closein interface- ServerConnection
- Parameters:
- interrupt- whether to interrupt in progress requests (always interrupts idle requests waiting for initial request data)
 
 
-