Interface WebSocketRequest

All Known Implementing Classes:
UndertowWebSocketRequest

public interface WebSocketRequest
A WebSocket request.
Since:
1.3.0
  • Method Details

    • acceptContentType

      boolean acceptContentType(String contentType)
      Checks if the current request accept a specific content type.
      Parameters:
      contentType - The content type
      Returns:
      true if the content type is accepted, otherwise, false
      Since:
      1.3.0
    • getHeader

      String getHeader(String headerName)
      Returns a single header.
      Parameters:
      headerName - The header name
      Returns:
      The requested header value, otherwise, a null value
      Since:
      1.3.0
    • getHeaders

      Map<String,List<String>> getHeaders()
      Returns all headers.
      Returns:
      All headers
      Since:
      1.3.0
    • getQueryString

      String getQueryString()
      Returns the query string, without the leading "?".
      Returns:
      The query string
      Since:
      1.3.0
    • getQueryStringParameters

      Map<String,List<String>> getQueryStringParameters()
      Returns all query string parameters.
      Returns:
      All query string parameters
      Since:
      1.3.0
    • getQueryStringParameter

      String getQueryStringParameter(String parameterName)
      Returns the query string parameter value. If the parameter does not exist, null value will be returned.
      Parameters:
      parameterName - The parameter name
      Returns:
      The query string parameter value
      Since:
      1.3.0
    • getQueryStringParameter

      String getQueryStringParameter(String parameterName, String fallbackValue)
      Returns the query string parameter value. If the parameter does not exist or associated value is blank, fallback value will be returned.
      Parameters:
      parameterName - The parameter name
      fallbackValue - The value to use if the parameter does not exist or associated value is blank
      Returns:
      The query string parameter value
      Since:
      1.6.0
    • getRequestURI

      String getRequestURI()
      Returns the original request URI. This is not decoded in any way, and does not include the query string.
      Returns:
      The request URI
      Since:
      1.3.0