Interface WebSocketEndpointConfiguration


public interface WebSocketEndpointConfiguration
An instance of WebSocketEndpointConfiguration can be passed to Core.addWebSocketEndpoint(String, Endpoint, WebSocketEndpointConfiguration) to configure the subprotocols or modify the handshake.
Since:
10.18.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<String>
    Returns which subprotocols should be supported for the WebSocket endpoint.
    default void
    modifyHandshake(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
    Modifies the WebSocket handshake.
  • Method Details

    • getSubprotocols

      default List<String> getSubprotocols()
      Returns which subprotocols should be supported for the WebSocket endpoint.
      Returns:
      the subprotocols to allow
    • modifyHandshake

      default void modifyHandshake(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
      Modifies the WebSocket handshake.
      Parameters:
      sec - the server endpoint configuration
      request - the handshake request
      response - the handshake response