public class UndertowRequestUpgradeStrategy extends AbstractStandardUpgradeStrategy
RequestUpgradeStrategy
for use with WildFly and its
underlying Undertow web server. Also compatible with embedded Undertow usage.
Compatible with Undertow 1.0 to 1.3 - as included in WildFly 8.x, 9 and 10.
Modifier and Type | Class and Description |
---|---|
private static class |
UndertowRequestUpgradeStrategy.EndpointInstanceFactory |
Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
createChannelMethod |
private static java.lang.reflect.Constructor<ConfiguredServerEndpoint> |
endpointConstructor |
private static boolean |
endpointConstructorWithEndpointFactory |
private static java.lang.reflect.Constructor<ServletWebSocketHttpExchange> |
exchangeConstructor |
private static boolean |
exchangeConstructorWithPeerConnections |
private static java.lang.reflect.Method |
getBufferPoolMethod |
private java.util.Set<WebSocketChannel> |
peerConnections |
private static java.lang.String[] |
supportedVersions |
logger
Constructor and Description |
---|
UndertowRequestUpgradeStrategy() |
Modifier and Type | Method and Description |
---|---|
private ConfiguredServerEndpoint |
createConfiguredServerEndpoint(java.lang.String selectedProtocol,
java.util.List<Extension> selectedExtensions,
Endpoint endpoint,
HttpServletRequest servletRequest) |
private ServletWebSocketHttpExchange |
createHttpExchange(HttpServletRequest request,
HttpServletResponse response) |
private Handshake |
getHandshakeToUse(ServletWebSocketHttpExchange exchange,
ConfiguredServerEndpoint endpoint) |
java.lang.String[] |
getSupportedVersions()
Return the supported WebSocket protocol versions.
|
protected void |
upgradeInternal(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String selectedProtocol,
java.util.List<Extension> selectedExtensions,
Endpoint endpoint) |
getContainer, getHttpServletRequest, getHttpServletResponse, getInstalledExtensions, getSupportedExtensions, upgrade
private static final java.lang.reflect.Constructor<ServletWebSocketHttpExchange> exchangeConstructor
private static final boolean exchangeConstructorWithPeerConnections
private static final java.lang.reflect.Constructor<ConfiguredServerEndpoint> endpointConstructor
private static final boolean endpointConstructorWithEndpointFactory
private static final java.lang.reflect.Method getBufferPoolMethod
private static final java.lang.reflect.Method createChannelMethod
private static final java.lang.String[] supportedVersions
private final java.util.Set<WebSocketChannel> peerConnections
public java.lang.String[] getSupportedVersions()
RequestUpgradeStrategy
protected void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, java.lang.String selectedProtocol, java.util.List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException
upgradeInternal
in class AbstractStandardUpgradeStrategy
HandshakeFailureException
private ServletWebSocketHttpExchange createHttpExchange(HttpServletRequest request, HttpServletResponse response)
private Handshake getHandshakeToUse(ServletWebSocketHttpExchange exchange, ConfiguredServerEndpoint endpoint)
private ConfiguredServerEndpoint createConfiguredServerEndpoint(java.lang.String selectedProtocol, java.util.List<Extension> selectedExtensions, Endpoint endpoint, HttpServletRequest servletRequest)