Top Description Inners Fields Constructors Methods
io.undertow.servlet.handlers

public Class ServletInitialHandler

extends Object
implements HttpHandler, ServletDispatcher
Class Inheritance
All Implemented Interfaces
io.undertow.servlet.api.ServletDispatcher, io.undertow.server.HttpHandler
Imports
io.undertow.UndertowLogger, .UndertowMessages, io.undertow.server.DefaultByteBufferPool, .HttpHandler, .HttpServerExchange, .HttpUpgradeListener, .SSLSessionInfo, .ServerConnection, .XnioBufferPoolAdaptor, io.undertow.servlet.api.Deployment, .ExceptionHandler, .LoggingExceptionHandler, .ServletDispatcher, .ThreadSetupHandler, io.undertow.servlet.core.ApplicationListeners, .ServletBlockingHttpExchange, io.undertow.servlet.spec.AsyncContextImpl, .HttpServletRequestImpl, .HttpServletResponseImpl, .RequestDispatcherImpl, .ServletContextImpl, io.undertow.util.HeaderValues, .Headers, .HttpString, .Protocols, .StatusCodes, org.xnio.ChannelListener, .Option, .OptionMap, .Pool, .StreamConnection, .XnioIoThread, .XnioWorker, io.undertow.connector.ByteBufferPool, org.xnio.channels.ConnectedChannel, org.xnio.conduits.ConduitStreamSinkChannel, .ConduitStreamSourceChannel, .StreamSinkConduit, jakarta.servlet.DispatcherType, .ServletException, .ServletRequest, .ServletResponse, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, java.io.IOException, java.net.SocketAddress, java.nio.ByteBuffer, java.security.AccessController, .PrivilegedExceptionAction, java.util.Map, java.util.concurrent.Executor

This must be the initial handler in the blocking servlet chain. This sets up the request and response objects, and attaches them the to exchange.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final HttpHandler
private final ExceptionHandler
private final ThreadSetupHandler.Action<Object, ServletRequestContext>
private final ApplicationListeners
private final HttpHandler
private final ServletPathMatches
private static final RuntimePermission
private final ServletContextImpl

Constructor Summary

AccessConstructor and Description
public
ServletInitialHandler(final ServletPathMatches paths, final HttpHandler next, final Deployment deployment, final ServletContextImpl servletContext)

Method Summary

Modifier and TypeMethod and Description
public void
dispatchMockRequest(HttpServletRequest
The request
request
,
HttpServletResponse
The response
response
)

Implements io.undertow.servlet.api.ServletDispatcher.dispatchMockRequest.

Dispatches a mock request to the servlet container.

private void
dispatchRequest(final HttpServerExchange exchange, final ServletRequestContext servletRequestContext, final ServletChain servletChain, final DispatcherType dispatcherType)

public void
dispatchToPath(final HttpServerExchange exchange, final ServletPathMatch pathInfo, final DispatcherType dispatcherType)

Implements io.undertow.servlet.api.ServletDispatcher.dispatchToPath.

Dispatches a servlet request to the specified servlet path, changing the current path

public void
dispatchToServlet(final HttpServerExchange exchange, final ServletChain servletchain, final DispatcherType dispatcherType)

Implements io.undertow.servlet.api.ServletDispatcher.dispatchToServlet.

Dispatches a servlet request to the specified servlet, without changing the current path

public HttpHandler
private void
handleFirstRequest(final HttpServerExchange exchange, ServletRequestContext servletRequestContext)

public void
handleRequest(final HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dispatchHandlerback to summary
private final HttpHandler dispatchHandler
exceptionHandlerback to summary
private final ExceptionHandler exceptionHandler
firstRequestHandlerback to summary
private final ThreadSetupHandler.Action<Object, ServletRequestContext> firstRequestHandler
listenersback to summary
private final ApplicationListeners listeners
nextback to summary
private final HttpHandler next
pathsback to summary
private final ServletPathMatches paths
PERMISSIONback to summary
private static final RuntimePermission PERMISSION
servletContextback to summary
private final ServletContextImpl servletContext

Constructor Detail

ServletInitialHandlerback to summary
public ServletInitialHandler(final ServletPathMatches paths, final HttpHandler next, final Deployment deployment, final ServletContextImpl servletContext)

Method Detail

dispatchMockRequestback to summary
public void dispatchMockRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException

Implements io.undertow.servlet.api.ServletDispatcher.dispatchMockRequest.

Doc from io.undertow.servlet.api.ServletDispatcher.dispatchMockRequest.

Dispatches a mock request to the servlet container.

Parameters
request:HttpServletRequest

The request

response:HttpServletResponse

The response

Annotations
@Override
dispatchRequestback to summary
private void dispatchRequest(final HttpServerExchange exchange, final ServletRequestContext servletRequestContext, final ServletChain servletChain, final DispatcherType dispatcherType) throws Exception
dispatchToPathback to summary
public void dispatchToPath(final HttpServerExchange exchange, final ServletPathMatch pathInfo, final DispatcherType dispatcherType) throws Exception

Implements io.undertow.servlet.api.ServletDispatcher.dispatchToPath.

Doc from io.undertow.servlet.api.ServletDispatcher.dispatchToPath.

Dispatches a servlet request to the specified servlet path, changing the current path

dispatchToServletback to summary
public void dispatchToServlet(final HttpServerExchange exchange, final ServletChain servletchain, final DispatcherType dispatcherType) throws Exception

Implements io.undertow.servlet.api.ServletDispatcher.dispatchToServlet.

Doc from io.undertow.servlet.api.ServletDispatcher.dispatchToServlet.

Dispatches a servlet request to the specified servlet, without changing the current path

Annotations
@Override
getNextback to summary
public HttpHandler getNext()
handleFirstRequestback to summary
private void handleFirstRequest(final HttpServerExchange exchange, ServletRequestContext servletRequestContext) throws Exception
handleRequestback to summary
public void handleRequest(final HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
isMultiPartExchangeback to summary
private boolean isMultiPartExchange(final HttpServerExchange exchange)
io.undertow.servlet.handlers back to summary

private Class ServletInitialHandler.MockServerConnection

extends ServerConnection
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
private XnioBufferPoolAdaptor
poolAdaptor

References Deprecated XnioBufferPoolAdaptor is deprecated or references (maybe indirectly) at least one deprecated element.
private SSLSessionInfo

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
addCloseListener(ServerConnection.CloseListener
The close listener
listener
)

Implements abstract io.undertow.server.ServerConnection.addCloseListener.

Adds a close listener, than will be invoked with the connection is closed

public void
protected void
exchangeComplete(HttpServerExchange exchange)

Implements abstract io.undertow.server.ServerConnection.exchangeComplete.

Invoked when the exchange is complete.

public Pool<ByteBuffer>
getBufferPool()

Implements abstract io.undertow.server.ServerConnection.getBufferPool.

References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.

public int
public ByteBufferPool
public ChannelListener.Setter<? extends ConnectedChannel>
getCloseSetter()

Implements org.xnio.channels.ConnectedChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel.

public XnioIoThread
getIoThread()

Implements abstract io.undertow.server.ServerConnection.getIoThread.

Implements org.xnio.channels.CloseableChannel.getIoThread.

Get the I/O thread associated with this channel.

public SocketAddress
getLocalAddress()

Implements abstract io.undertow.server.ServerConnection.getLocalAddress.

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

public <A extends SocketAddress> A
getLocalAddress(Class<A>
the address type class
type
)

Implements abstract io.undertow.server.ServerConnection.getLocalAddress.

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address of a given type, or null if the address is not of that type.

public <T> T
getOption(Option<T>
the option to get
option
)

Implements abstract io.undertow.server.ServerConnection.getOption.

Implements org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

public SocketAddress
getPeerAddress()

Implements abstract io.undertow.server.ServerConnection.getPeerAddress.

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Returns the actual address of the remote connection.

public <A extends SocketAddress> A
getPeerAddress(Class<A>
The type of address to return
type
)

Implements abstract io.undertow.server.ServerConnection.getPeerAddress.

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Returns the actual address of the remote connection.

public ConduitStreamSinkChannel
protected StreamSinkConduit
getSinkConduit(HttpServerExchange exchange, StreamSinkConduit conduit)

Implements abstract io.undertow.server.ServerConnection.getSinkConduit.

Gets the sink conduit that should be used for this request.

public ConduitStreamSourceChannel
public SSLSessionInfo
getSslSessionInfo()

Implements abstract io.undertow.server.ServerConnection.getSslSessionInfo.

Gets SSL information about the connection.

public String
getTransportProtocol()

Implements abstract io.undertow.server.ServerConnection.getTransportProtocol.

Returns a string representation describing the protocol used to transmit messages on this connection.

public OptionMap
public XnioWorker
getWorker()

Implements abstract io.undertow.server.ServerConnection.getWorker.

Implements org.xnio.channels.CloseableChannel.getWorker.

Get the worker for this channel.

protected boolean
public boolean
public boolean
isOpen()

Implements abstract io.undertow.server.ServerConnection.isOpen.

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

public boolean
protected boolean
protected void
maxEntitySizeUpdated(HttpServerExchange
The current exchange
exchange
)

Implements abstract io.undertow.server.ServerConnection.maxEntitySizeUpdated.

Callback that is invoked if the max entity size is updated.

public HttpServerExchange
sendOutOfBandResponse(HttpServerExchange
The current exchange
exchange
)

Implements abstract io.undertow.server.ServerConnection.sendOutOfBandResponse.

Sends an out of band response, such as a HTTP 100-continue response.

protected void
public <T> T
setOption(Option<T>
the option to set
option
,
T
the value of the option to set
value
)

Implements abstract io.undertow.server.ServerConnection.setOption.

Implements org.xnio.channels.Configurable.setOption.

Set an option for this channel.

public void
setSslSessionInfo(SSLSessionInfo
The ssl session information
sessionInfo
)

Implements abstract io.undertow.server.ServerConnection.setSslSessionInfo.

Sets the current SSL information.

protected void
public boolean
supportsOption(Option<?>
the option
option
)

Implements abstract io.undertow.server.ServerConnection.supportsOption.

Implements org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

public void
terminateRequestChannel(HttpServerExchange
The current exchange.
exchange
)

Implements abstract io.undertow.server.ServerConnection.terminateRequestChannel.

Invoked when the exchange is complete, and there is still data in the request channel.

public StreamConnection
upgradeChannel()

Implements abstract io.undertow.server.ServerConnection.upgradeChannel.

Upgrade the connection, if allowed

Inherited from io.undertow.server.ServerConnection:
getIdgetProtocolRequestIdgetSslSessionisPushSupportedpushResourcepushResource

Field Detail

bufferPoolback to summary
private final ByteBufferPool bufferPool
poolAdaptorback to summary
private XnioBufferPoolAdaptor poolAdaptor

References Deprecated

XnioBufferPoolAdaptor is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

sslSessionInfoback to summary
private SSLSessionInfo sslSessionInfo

Constructor Detail

MockServerConnectionback to summary
private MockServerConnection(ByteBufferPool bufferPool)

Method Detail

addCloseListenerback to summary
public void addCloseListener(ServerConnection.CloseListener listener)

Implements abstract io.undertow.server.ServerConnection.addCloseListener.

Doc from io.undertow.server.ServerConnection.addCloseListener.

Adds a close listener, than will be invoked with the connection is closed

Parameters
listener:ServerConnection.CloseListener

The close listener

Annotations
@Override
closeback to summary
public void close() throws IOException

Implements abstract io.undertow.server.ServerConnection.close.

Implements org.xnio.channels.CloseableChannel.close.

Doc from org.xnio.channels.CloseableChannel.close.

Close this channel. When a channel is closed, its close listener is invoked. Invoking this method more than once has no additional effect.

Annotations
@Override
Exceptions
IOException:
if the close failed
exchangeCompleteback to summary
protected void exchangeComplete(HttpServerExchange exchange)

Implements abstract io.undertow.server.ServerConnection.exchangeComplete.

Doc from io.undertow.server.ServerConnection.exchangeComplete.

Invoked when the exchange is complete.

Annotations
@Override
getBufferPoolback to summary
public Pool<ByteBuffer> getBufferPool()

Implements abstract io.undertow.server.ServerConnection.getBufferPool.

References Deprecated

Pool is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns:Pool<ByteBuffer>

Doc from io.undertow.server.ServerConnection.getBufferPool.

The connections buffer pool

Annotations
@Override
getBufferSizeback to summary
public int getBufferSize()

Implements abstract io.undertow.server.ServerConnection.getBufferSize.

Annotations
@Override
getByteBufferPoolback to summary
public ByteBufferPool getByteBufferPool()

Implements abstract io.undertow.server.ServerConnection.getByteBufferPool.

Returns:ByteBufferPool

Doc from io.undertow.server.ServerConnection.getByteBufferPool.

The connections buffer pool

Annotations
@Override
getCloseSetterback to summary
public ChannelListener.Setter<? extends ConnectedChannel> getCloseSetter()

Implements org.xnio.channels.ConnectedChannel.getCloseSetter.

Doc from org.xnio.channels.ConnectedChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.

Returns:ChannelListener.Setter<? extends ConnectedChannel>

Doc from org.xnio.channels.CloseableChannel.getCloseSetter.

the setter

Annotations
@Override
getIoThreadback to summary
public XnioIoThread getIoThread()

Implements abstract io.undertow.server.ServerConnection.getIoThread.

Implements org.xnio.channels.CloseableChannel.getIoThread.

Doc from org.xnio.channels.CloseableChannel.getIoThread.

Get the I/O thread associated with this channel.

Returns:XnioIoThread

Doc from io.undertow.server.ServerConnection.getIoThread.

The IO thread associated with the connection

Annotations
@Override
getLocalAddressback to summary
public SocketAddress getLocalAddress()

Implements abstract io.undertow.server.ServerConnection.getLocalAddress.

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

Returns:SocketAddress

the local address

Annotations
@Override
getLocalAddressback to summary
public <A extends SocketAddress> A getLocalAddress(Class<A> type)

Implements abstract io.undertow.server.ServerConnection.getLocalAddress.

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address of a given type, or null if the address is not of that type.

Parameters
<A>
the address type
type:Class<A>

the address type class

Returns:A

the local address, or null if unknown

Annotations
@Override
getOptionback to summary
public <T> T getOption(Option<T> option) throws IOException

Implements abstract io.undertow.server.ServerConnection.getOption.

Implements org.xnio.channels.Configurable.getOption.

Doc from org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

Parameters
<T>
the type of the option value
option:Option<T>

the option to get

Returns:T

the value of the option, or null if it is not set

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred when reading the option
getPeerAddressback to summary
public SocketAddress getPeerAddress()

Implements abstract io.undertow.server.ServerConnection.getPeerAddress.

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Doc from io.undertow.server.ServerConnection.getPeerAddress.

Returns the actual address of the remote connection. This will not take things like X-Forwarded-for into account.

Returns:SocketAddress

The address of the remote peer

Annotations
@Override
getPeerAddressback to summary
public <A extends SocketAddress> A getPeerAddress(Class<A> type)

Implements abstract io.undertow.server.ServerConnection.getPeerAddress.

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Doc from io.undertow.server.ServerConnection.getPeerAddress.

Returns the actual address of the remote connection. This will not take things like X-Forwarded-for into account.

Parameters
<A>
The address type
type:Class<A>

The type of address to return

Returns:A

The remote endpoint address

Annotations
@Override
getSinkChannelback to summary
public ConduitStreamSinkChannel getSinkChannel()

Implements abstract io.undertow.server.ServerConnection.getSinkChannel.

Annotations
@Override
getSinkConduitback to summary
protected StreamSinkConduit getSinkConduit(HttpServerExchange exchange, StreamSinkConduit conduit)

Implements abstract io.undertow.server.ServerConnection.getSinkConduit.

Doc from io.undertow.server.ServerConnection.getSinkConduit.

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.

Returns:StreamSinkConduit

The source conduit

Annotations
@Override
getSourceChannelback to summary
public ConduitStreamSourceChannel getSourceChannel()

Implements abstract io.undertow.server.ServerConnection.getSourceChannel.

Annotations
@Override
getSslSessionInfoback to summary
public SSLSessionInfo getSslSessionInfo()

Implements abstract io.undertow.server.ServerConnection.getSslSessionInfo.

Doc from io.undertow.server.ServerConnection.getSslSessionInfo.

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.

Returns:SSLSessionInfo

SSL information about the connection

Annotations
@Override
getTransportProtocolback to summary
public String getTransportProtocol()

Implements abstract io.undertow.server.ServerConnection.getTransportProtocol.

Doc from io.undertow.server.ServerConnection.getTransportProtocol.

Returns a string representation describing the protocol used to transmit messages on this connection.

Returns:String

the transport protocol

Annotations
@Override
getUndertowOptionsback to summary
public OptionMap getUndertowOptions()

Implements abstract io.undertow.server.ServerConnection.getUndertowOptions.

Annotations
@Override
getWorkerback to summary
public XnioWorker getWorker()

Implements abstract io.undertow.server.ServerConnection.getWorker.

Implements org.xnio.channels.CloseableChannel.getWorker.

Doc from org.xnio.channels.CloseableChannel.getWorker.

Get the worker for this channel.

Returns:XnioWorker

Doc from io.undertow.server.ServerConnection.getWorker.

The connections worker

Annotations
@Override
isConnectSupportedback to summary
protected boolean isConnectSupported()

Implements abstract io.undertow.server.ServerConnection.isConnectSupported.

Returns:boolean

Doc from io.undertow.server.ServerConnection.isConnectSupported.

true if this connection supports the HTTP CONNECT verb

Annotations
@Override
isContinueResponseSupportedback to summary
public boolean isContinueResponseSupported()

Implements abstract io.undertow.server.ServerConnection.isContinueResponseSupported.

Returns:boolean

Doc from io.undertow.server.ServerConnection.isContinueResponseSupported.

true if this connection supports sending a 100-continue response

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements abstract io.undertow.server.ServerConnection.isOpen.

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

Doc from io.undertow.server.ServerConnection.isOpen.

true if the connection is open

Annotations
@Override
isRequestTrailerFieldsSupportedback to summary
public boolean isRequestTrailerFieldsSupported()

Implements abstract io.undertow.server.ServerConnection.isRequestTrailerFieldsSupported.

Annotations
@Override
isUpgradeSupportedback to summary
protected boolean isUpgradeSupported()

Implements abstract io.undertow.server.ServerConnection.isUpgradeSupported.

Returns:boolean

Doc from io.undertow.server.ServerConnection.isUpgradeSupported.

true if this connection supports HTTP upgrade

Annotations
@Override
maxEntitySizeUpdatedback to summary
protected void maxEntitySizeUpdated(HttpServerExchange exchange)

Implements abstract io.undertow.server.ServerConnection.maxEntitySizeUpdated.

Doc from io.undertow.server.ServerConnection.maxEntitySizeUpdated.

Callback that is invoked if the max entity size is updated.

Parameters
exchange:HttpServerExchange

The current exchange

Annotations
@Override
sendOutOfBandResponseback to summary
public HttpServerExchange sendOutOfBandResponse(HttpServerExchange exchange)

Implements abstract io.undertow.server.ServerConnection.sendOutOfBandResponse.

Doc from io.undertow.server.ServerConnection.sendOutOfBandResponse.

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.

Parameters
exchange:HttpServerExchange

The current exchange

Returns:HttpServerExchange

The out of band exchange.

Annotations
@Override
setConnectListenerback to summary
protected void setConnectListener(HttpUpgradeListener connectListener)

Implements abstract io.undertow.server.ServerConnection.setConnectListener.

Annotations
@Override
setOptionback to summary
public <T> T setOption(Option<T> option, T value) throws IllegalArgumentException, IOException

Implements abstract io.undertow.server.ServerConnection.setOption.

Implements org.xnio.channels.Configurable.setOption.

Doc from org.xnio.channels.Configurable.setOption.

Set an option for this channel. Unsupported options are ignored.

Parameters
<T>
the type of the option value
option:Option<T>

the option to set

value:T

the value of the option to set

Returns:T

the previous option value, if any

Annotations
@Override
Exceptions
IllegalArgumentException:
if the value is not acceptable for this option
IOException:
if an I/O error occurred when modifying the option
setSslSessionInfoback to summary
public void setSslSessionInfo(SSLSessionInfo sessionInfo)

Implements abstract io.undertow.server.ServerConnection.setSslSessionInfo.

Doc from io.undertow.server.ServerConnection.setSslSessionInfo.

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.

Parameters
sessionInfo:SSLSessionInfo

The ssl session information

Annotations
@Override
setUpgradeListenerback to summary
protected void setUpgradeListener(HttpUpgradeListener upgradeListener)

Implements abstract io.undertow.server.ServerConnection.setUpgradeListener.

Annotations
@Override
supportsOptionback to summary
public boolean supportsOption(Option<?> option)

Implements abstract io.undertow.server.ServerConnection.supportsOption.

Implements org.xnio.channels.Configurable.supportsOption.

Doc from org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

Parameters
option:Option<?>

the option

Returns:boolean

true if it is supported

Annotations
@Override
terminateRequestChannelback to summary
public void terminateRequestChannel(HttpServerExchange exchange)

Implements abstract io.undertow.server.ServerConnection.terminateRequestChannel.

Doc from io.undertow.server.ServerConnection.terminateRequestChannel.

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.

Parameters
exchange:HttpServerExchange

The current exchange.

Annotations
@Override
upgradeChannelback to summary
public StreamConnection upgradeChannel()

Implements abstract io.undertow.server.ServerConnection.upgradeChannel.

Doc from io.undertow.server.ServerConnection.upgradeChannel.

Upgrade the connection, if allowed

Returns:StreamConnection

The StreamConnection that should be passed to the upgrade handler

Annotations
@Override