public interface RequestUpgradeStrategy
Modifier and Type | Method and Description |
---|---|
java.util.List<WebSocketExtension> |
getSupportedExtensions(ServerHttpRequest request)
Return the WebSocket protocol extensions supported by the underlying WebSocket server.
|
java.lang.String[] |
getSupportedVersions()
Return the supported WebSocket protocol versions.
|
void |
upgrade(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String selectedProtocol,
java.util.List<WebSocketExtension> selectedExtensions,
java.security.Principal user,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Perform runtime specific steps to complete the upgrade.
|
java.lang.String[] getSupportedVersions()
java.util.List<WebSocketExtension> getSupportedExtensions(ServerHttpRequest request)
void upgrade(ServerHttpRequest request, ServerHttpResponse response, @Nullable java.lang.String selectedProtocol, java.util.List<WebSocketExtension> selectedExtensions, @Nullable java.security.Principal user, WebSocketHandler wsHandler, java.util.Map<java.lang.String,java.lang.Object> attributes) throws HandshakeFailureException
request
- the current requestresponse
- the current responseselectedProtocol
- the selected sub-protocol, if anyselectedExtensions
- the selected WebSocket protocol extensionsuser
- the user to associate with the WebSocket sessionwsHandler
- the handler for WebSocket messagesattributes
- handshake request specific attributes to be set on the WebSocket
session via HandshakeInterceptor
and
thus made available to the WebSocketHandler
HandshakeFailureException
- 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.