Note that the lifecycle of the server connection is tied to the underlying TCP connection. Even if the channel is upgraded the connection is not considered closed until the upgraded channel is closed.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ServerFixedLengthStreamSinkConduit | |
| private PipeliningBufferingStreamSinkConduit | |
| private ReadDataStreamSourceConduit | |
| private HttpReadListener | |
| private HttpResponseConduit | |
| private SSLSessionInfo | |
| private HttpUpgradeListener |
| Access | Constructor and Description |
|---|---|
| public | HttpServerConnection(StreamConnection channel, final ByteBufferPool bufferPool, final HttpHandler rootHandler, final OptionMap undertowOptions, final int bufferSize, final ConnectorStatisticsImpl connectorStatistics)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | exchangeComplete(HttpServerExchange exchange)
Implements abstract io. Invoked when the exchange is complete. |
| pack-priv ServerFixedLengthStreamSinkConduit | |
| public PipeliningBufferingStreamSinkConduit | |
| pack-priv ReadDataStreamSourceConduit | |
| pack-priv HttpReadListener | |
| public HttpResponseConduit | |
| protected StreamSinkConduit | getSinkConduit(HttpServerExchange exchange, StreamSinkConduit conduit)
Implements abstract io. Gets the sink conduit that should be used for this request. |
| public SSLSession | getSslSession()
Overrides io. Gets the SSLSession of the underlying connection, or null if SSL is not in use. |
| public SSLSessionInfo | getSslSessionInfo()
Implements abstract io. Gets SSL information about the connection. |
| public String | getTransportProtocol()
Implements abstract io. Returns a string representation describing the protocol used to transmit messages on this connection. |
| protected HttpUpgradeListener | |
| pack-priv boolean | |
| protected boolean | |
| public boolean | isContinueResponseSupported()
Implements abstract io.
|
| public boolean | |
| protected boolean | |
| public HttpServerExchange | sendOutOfBandResponse(HttpServerExchange
The current exchange exchange)Implements abstract io. Sends an out of band response, such as a HTTP 100-continue response. |
| protected void | setConnectListener(HttpUpgradeListener connectListener)
Implements abstract io.
|
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | setSslSessionInfo(SSLSessionInfo
The ssl session information sessionInfo)Implements abstract io. Sets the current SSL information. |
| protected void | setUpgradeListener(HttpUpgradeListener upgradeListener)
Overrides io.
|
| public void | terminateRequestChannel(HttpServerExchange
The current exchange. exchange)Implements abstract io. Invoked when the exchange is complete, and there is still data in the request channel. |
| public void | |
| protected StreamConnection | upgradeChannel()
Implements abstract io. Upgrade the connection, if allowed |
| connectHandled | back to summary |
|---|---|
| private boolean connectHandled | |
| fixedLengthStreamSinkConduit | back to summary |
|---|---|
| private ServerFixedLengthStreamSinkConduit fixedLengthStreamSinkConduit | |
| pipelineBuffer | back to summary |
|---|---|
| private PipeliningBufferingStreamSinkConduit pipelineBuffer | |
| readDataStreamSourceConduit | back to summary |
|---|---|
| private ReadDataStreamSourceConduit readDataStreamSourceConduit | |
| readListener | back to summary |
|---|---|
| private HttpReadListener readListener | |
| responseConduit | back to summary |
|---|---|
| private HttpResponseConduit responseConduit | |
| sslSessionInfo | back to summary |
|---|---|
| private SSLSessionInfo sslSessionInfo | |
| upgradeListener | back to summary |
|---|---|
| private HttpUpgradeListener upgradeListener | |
| HttpServerConnection | back to summary |
|---|---|
| public HttpServerConnection(StreamConnection channel, final ByteBufferPool bufferPool, final HttpHandler rootHandler, final OptionMap undertowOptions, final int bufferSize, final ConnectorStatisticsImpl connectorStatistics) | |
| exchangeComplete | back to summary |
|---|---|
| protected void exchangeComplete(HttpServerExchange exchange) Implements abstract io. Doc from io. Invoked when the exchange is complete.
| |
| getFixedLengthStreamSinkConduit | back to summary |
|---|---|
| pack-priv ServerFixedLengthStreamSinkConduit getFixedLengthStreamSinkConduit() | |
| getPipelineBuffer | back to summary |
|---|---|
| public PipeliningBufferingStreamSinkConduit getPipelineBuffer() | |
| getReadDataStreamSourceConduit | back to summary |
|---|---|
| pack-priv ReadDataStreamSourceConduit getReadDataStreamSourceConduit() | |
| getReadListener | back to summary |
|---|---|
| pack-priv HttpReadListener getReadListener() | |
| getResponseConduit | back to summary |
|---|---|
| public HttpResponseConduit getResponseConduit() | |
| getSinkConduit | back to summary |
|---|---|
| protected StreamSinkConduit getSinkConduit(HttpServerExchange exchange, StreamSinkConduit conduit) Implements abstract io. Doc from io. Gets the sink conduit that should be used for this request. This allows the connection to apply any per-request conduit wrapping that is required, without adding to the response wrappers array. There is no corresponding method for source conduits, as in general conduits can be directly inserted into the connection after the request has been read.
| |
| getSslSession | back to summary |
|---|---|
| public SSLSession getSslSession() Overrides io. Doc from io. Gets the SSLSession of the underlying connection, or null if SSL is not in use.
Note that for client cert auth
| |
| getSslSessionInfo | back to summary |
|---|---|
| public SSLSessionInfo getSslSessionInfo() Implements abstract io. Doc from io. Gets SSL information about the connection. This could represent the actual client connection, or could be providing SSL information that was provided by a front end proxy.
| |
| getTransportProtocol | back to summary |
|---|---|
| public String getTransportProtocol() Implements abstract io. Doc from io. Returns a string representation describing the protocol used to transmit messages on this connection. | |
| getUpgradeListener | back to summary |
|---|---|
| protected HttpUpgradeListener getUpgradeListener() | |
| isConnectHandled | back to summary |
|---|---|
| pack-priv boolean isConnectHandled() | |
| isConnectSupported | back to summary |
|---|---|
| protected boolean isConnectSupported() Implements abstract io.
| |
| isContinueResponseSupported | back to summary |
|---|---|
| public boolean isContinueResponseSupported() Implements abstract io.
| |
| isRequestTrailerFieldsSupported | back to summary |
|---|---|
| public boolean isRequestTrailerFieldsSupported() Implements abstract io.
| |
| isUpgradeSupported | back to summary |
|---|---|
| protected boolean isUpgradeSupported() Implements abstract io.
| |
| sendOutOfBandResponse | back to summary |
|---|---|
| public HttpServerExchange sendOutOfBandResponse(HttpServerExchange exchange) Implements abstract io. Doc from io. Sends an out of band response, such as a HTTP 100-continue response. Warning do not attempt to write to the current exchange until the out of band exchange has been fully written. Doing so may have unexpected results. Todo this needs more thought.
| |
| setConnectListener | back to summary |
|---|---|
| protected void setConnectListener(HttpUpgradeListener connectListener) Implements abstract io.
| |
| setCurrentExchange | back to summary |
|---|---|
| pack-priv void setCurrentExchange(HttpServerExchange exchange) | |
| setPipelineBuffer | back to summary |
|---|---|
| public void setPipelineBuffer(PipeliningBufferingStreamSinkConduit pipelineBuffer) | |
| setReadListener | back to summary |
|---|---|
| pack-priv void setReadListener(HttpReadListener readListener) | |
| setSslSessionInfo | back to summary |
|---|---|
| public void setSslSessionInfo(SSLSessionInfo sessionInfo) Implements abstract io. Doc from io. Sets the current SSL information. This can be used by handlers to setup SSL information that was provided by a front end proxy. If this is being set of a per request basis then you must ensure that it is either cleared by an exchange completion listener at the end of the request, or is always set for every request. Otherwise it is possible to SSL information to 'leak' between requests.
| |
| setUpgradeListener | back to summary |
|---|---|
| protected void setUpgradeListener(HttpUpgradeListener upgradeListener) Overrides io.
| |
| terminateRequestChannel | back to summary |
|---|---|
| public void terminateRequestChannel(HttpServerExchange exchange) Implements abstract io. Doc from io. Invoked when the exchange is complete, and there is still data in the request channel. Some implementations (such as SPDY and HTTP2) have more efficient ways to drain the request than simply reading all data (e.g. RST_STREAM). After this method is invoked the stream will be drained normally.
| |
| ungetRequestBytes | back to summary |
|---|---|
| public void ungetRequestBytes(final PooledByteBuffer unget) Pushes back the given data. This should only be used by transfer coding handlers that have read past the end of the request when handling pipelined requests
| |
| upgradeChannel | back to summary |
|---|---|
| protected StreamConnection upgradeChannel() Implements abstract io. Doc from io. Upgrade the connection, if allowed
| |