public final class HttpServerConnection extends AbstractServerConnection
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.
AbstractServerConnection.ConduitStateServerConnection.CloseListenerbufferPool, channel, closeListeners, closeSetter, current, extraBytes, originalSinkConduit, originalSourceConduit, rootHandler, undertowOptions| Constructor and Description |
|---|
HttpServerConnection(org.xnio.StreamConnection channel, ByteBufferPool bufferPool, HttpHandler rootHandler, org.xnio.OptionMap undertowOptions, int bufferSize, ConnectorStatisticsImpl connectorStatistics) |
| Modifier and Type | Method and Description |
|---|---|
protected void | exchangeComplete(HttpServerExchange exchange) Invoked when the exchange is complete. |
PipeliningBufferingStreamSinkConduit | getPipelineBuffer() |
io.undertow.server.protocol.http.HttpResponseConduit | getResponseConduit() |
protected org.xnio.conduits.StreamSinkConduit | getSinkConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSinkConduit conduit) Gets the sink conduit that should be used for this request. |
SSLSession | getSslSession() Gets the SSLSession of the underlying connection, or null if SSL is not in use. |
SSLSessionInfo | getSslSessionInfo() Gets SSL information about the connection. |
String | getTransportProtocol() Returns a string representation describing the protocol used to transmit messages on this connection. |
protected HttpUpgradeListener | getUpgradeListener() |
protected boolean | isConnectSupported() |
boolean | isContinueResponseSupported() |
boolean | isRequestTrailerFieldsSupported() |
protected boolean | isUpgradeSupported() |
HttpServerExchange | sendOutOfBandResponse(HttpServerExchange exchange) Sends an out of band response, such as a HTTP 100-continue response. |
protected void | setConnectListener(HttpUpgradeListener connectListener) |
void | setPipelineBuffer(PipeliningBufferingStreamSinkConduit pipelineBuffer) |
void | setSslSessionInfo(SSLSessionInfo sessionInfo) Sets the current SSL information. |
protected void | setUpgradeListener(HttpUpgradeListener upgradeListener) |
void | terminateRequestChannel(HttpServerExchange exchange) Invoked when the exchange is complete, and there is still data in the request channel. |
void | ungetRequestBytes(PooledByteBuffer unget) Pushes back the given data. |
protected org.xnio.StreamConnection | upgradeChannel() Upgrade the connection, if allowed |
addCloseListener, clearChannel, close, getBufferPool, getBufferSize, getByteBufferPool, getChannel, getCloseSetter, getExtraBytes, getIoThread, getLocalAddress, getLocalAddress, getOption, getOriginalSinkConduit, getOriginalSourceConduit, getPeerAddress, getPeerAddress, getRootHandler, getSinkChannel, getSourceChannel, getUndertowOptions, getWorker, isOpen, maxEntitySizeUpdated, resetChannel, restoreChannel, setExtraBytes, setOption, sink, source, supportsOptionisPushSupported, pushResource, pushResourceaddToAttachmentList, createAttachmentMap, getAttachment, getAttachmentList, putAttachment, removeAttachmentpublic HttpServerConnection(org.xnio.StreamConnection channel,
ByteBufferPool bufferPool,
HttpHandler rootHandler,
org.xnio.OptionMap undertowOptions,
int bufferSize,
ConnectorStatisticsImpl connectorStatistics) public HttpServerExchange sendOutOfBandResponse(HttpServerExchange exchange)
ServerConnectionsendOutOfBandResponse in class ServerConnectionexchange - The current exchangepublic boolean isContinueResponseSupported()
isContinueResponseSupported in class ServerConnectiontrue if this connection supports sending a 100-continue responsepublic void terminateRequestChannel(HttpServerExchange exchange)
ServerConnectionterminateRequestChannel in class ServerConnectionexchange - The current exchange.public void ungetRequestBytes(PooledByteBuffer unget)
unget - The buffer to push backpublic SSLSessionInfo getSslSessionInfo()
ServerConnectiongetSslSessionInfo in class ServerConnectionpublic void setSslSessionInfo(SSLSessionInfo sessionInfo)
ServerConnectionsetSslSessionInfo in class ServerConnectionsessionInfo - The ssl session informationpublic SSLSession getSslSession()
ServerConnectionServerConnection.getSslSessionInfo() should be used instead, as it takes into account other information potentially provided by load balancers that terminate SSLgetSslSession in class ServerConnectionprotected org.xnio.StreamConnection upgradeChannel()
ServerConnectionupgradeChannel in class ServerConnectionprotected org.xnio.conduits.StreamSinkConduit getSinkConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSinkConduit conduit)
ServerConnectiongetSinkConduit in class ServerConnectionprotected boolean isUpgradeSupported()
isUpgradeSupported in class ServerConnectionprotected boolean isConnectSupported()
isConnectSupported in class ServerConnectiontrue if this connection supports the HTTP CONNECT verbprotected void exchangeComplete(HttpServerExchange exchange)
ServerConnectionexchangeComplete in class ServerConnectionpublic PipeliningBufferingStreamSinkConduit getPipelineBuffer()
public io.undertow.server.protocol.http.HttpResponseConduit getResponseConduit()
protected HttpUpgradeListener getUpgradeListener()
protected void setUpgradeListener(HttpUpgradeListener upgradeListener)
setUpgradeListener in class AbstractServerConnectionprotected void setConnectListener(HttpUpgradeListener connectListener)
setConnectListener in class ServerConnectionpublic void setPipelineBuffer(PipeliningBufferingStreamSinkConduit pipelineBuffer)
public String getTransportProtocol()
ServerConnectiongetTransportProtocol in class ServerConnectionpublic boolean isRequestTrailerFieldsSupported()
isRequestTrailerFieldsSupported in class ServerConnectionCopyright © 2020 JBoss by Red Hat. All rights reserved.