public class Jetty10RequestUpgradeStrategy extends Object implements RequestUpgradeStrategy
RequestUpgradeStrategy for Jetty 10.| Constructor and Description |
|---|
Jetty10RequestUpgradeStrategy() |
| Modifier and Type | Method and Description |
|---|---|
List<WebSocketExtension> |
getSupportedExtensions(ServerHttpRequest request)
Return the WebSocket protocol extensions supported by the underlying WebSocket server.
|
String[] |
getSupportedVersions()
Return the supported WebSocket protocol versions.
|
void |
upgrade(ServerHttpRequest request,
ServerHttpResponse response,
String selectedProtocol,
List<WebSocketExtension> selectedExtensions,
Principal user,
WebSocketHandler handler,
Map<String,Object> attributes)
Perform runtime specific steps to complete the upgrade.
|
public String[] getSupportedVersions()
RequestUpgradeStrategygetSupportedVersions in interface RequestUpgradeStrategypublic List<WebSocketExtension> getSupportedExtensions(ServerHttpRequest request)
RequestUpgradeStrategygetSupportedExtensions in interface RequestUpgradeStrategypublic void upgrade(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<WebSocketExtension> selectedExtensions, @Nullable Principal user, WebSocketHandler handler, Map<String,Object> attributes) throws HandshakeFailureException
RequestUpgradeStrategyupgrade in interface RequestUpgradeStrategyrequest - the current requestresponse - the current responseselectedProtocol - the selected sub-protocol, if anyselectedExtensions - the selected WebSocket protocol extensionsuser - the user to associate with the WebSocket sessionhandler - the handler for WebSocket messagesattributes - handshake request specific attributes to be set on the WebSocket
session via HandshakeInterceptor and
thus made available to the WebSocketHandlerHandshakeFailureException - thrown when handshake processing failed to
complete due to an internal, unrecoverable error, i.e. a server error as
opposed to a failure to successfully negotiate the requirements of the
handshake request.