WsHandshakeResponse (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket, class: WsHandshakeResponse

# Class WsHandshakeResponse

java.lang.Object
org.apache.tomcat.websocket.WsHandshakeResponse

All Implemented Interfaces:
  `HandshakeResponse`

public class WsHandshakeResponse extends Object implements HandshakeResponse
Represents the response to a WebSocket handshake.

- ## Field Summary

  ### Fields inherited from interface HandshakeResponse

  `SEC_WEBSOCKET_ACCEPT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WsHandshakeResponse()`
  Default constructor.
  `WsHandshakeResponse(Map<String, List<String>> headers)`
  Creates a handshake response from the given headers.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String, List<String>>`
  `getHeaders()`
  Returns the HTTP headers from the handshake response.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### WsHandshakeResponse

    public WsHandshakeResponse()
    Default constructor.

  - ### WsHandshakeResponse

    public WsHandshakeResponse(Map<String, List<String>> headers)
    Creates a handshake response from the given headers.
    Parameters:
      `headers` - the response headers

- ## Method Details

  - ### getHeaders

    public Map<String, List<String>> getHeaders()
    Description copied from interface: `jakarta.websocket.HandshakeResponse`
    Returns the HTTP headers from the handshake response.
    Specified by:
      `getHeaders` in interface `HandshakeResponse`
    Returns:
      The HTTP headers