Class HandshakeUtil


  • public final class HandshakeUtil
    extends java.lang.Object
    Internal util class for handshaking
    Author:
    Norman Maurer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static io.undertow.util.AttachmentKey<java.util.Map<java.lang.String,​java.lang.String>> PATH_PARAMS  
      static io.undertow.util.AttachmentKey<java.security.Principal> PRINCIPAL  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static boolean checkOrigin​(jakarta.websocket.server.ServerEndpointConfig config, io.undertow.websockets.spi.WebSocketHttpExchange exchange)
      Checks the orgin against the
      static ConfiguredServerEndpoint getConfig​(io.undertow.websockets.core.WebSocketChannel channel)
      Returns the ConfiguredServerEndpoint which was used while create the WebSocketChannel.
      static void prepareUpgrade​(jakarta.websocket.server.ServerEndpointConfig config, io.undertow.websockets.spi.WebSocketHttpExchange exchange)
      Prepare for upgrade
      static void propagate​(io.undertow.server.HttpServerExchange source, io.undertow.servlet.websockets.ServletWebSocketHttpExchange target)  
      static void setConfig​(io.undertow.websockets.core.WebSocketChannel channel, ConfiguredServerEndpoint config)
      Deprecated.
      static void setConfig​(io.undertow.websockets.core.WebSocketChannel channel, ConfiguredServerEndpoint config, io.undertow.websockets.spi.WebSocketHttpExchange exchange)
      Set the ConfiguredServerEndpoint which is used to create the WebSocketChannel.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PATH_PARAMS

        public static final io.undertow.util.AttachmentKey<java.util.Map<java.lang.String,​java.lang.String>> PATH_PARAMS
      • PRINCIPAL

        public static final io.undertow.util.AttachmentKey<java.security.Principal> PRINCIPAL
    • Method Detail

      • checkOrigin

        public static boolean checkOrigin​(jakarta.websocket.server.ServerEndpointConfig config,
                                          io.undertow.websockets.spi.WebSocketHttpExchange exchange)
        Checks the orgin against the
      • prepareUpgrade

        public static void prepareUpgrade​(jakarta.websocket.server.ServerEndpointConfig config,
                                          io.undertow.websockets.spi.WebSocketHttpExchange exchange)
        Prepare for upgrade
      • setConfig

        public static void setConfig​(io.undertow.websockets.core.WebSocketChannel channel,
                                     ConfiguredServerEndpoint config,
                                     io.undertow.websockets.spi.WebSocketHttpExchange exchange)
        Set the ConfiguredServerEndpoint which is used to create the WebSocketChannel.
      • propagate

        public static void propagate​(io.undertow.server.HttpServerExchange source,
                                     io.undertow.servlet.websockets.ServletWebSocketHttpExchange target)