Class UndertowWebSocketRequest

java.lang.Object
dev.voidframework.web.server.http.UndertowWebSocketRequest
All Implemented Interfaces:
WebSocketRequest

public final class UndertowWebSocketRequest extends Object implements WebSocketRequest
Undertow WebSocketRequest implementation.
Since:
1.3.0
  • Constructor Details

    • UndertowWebSocketRequest

      public UndertowWebSocketRequest(io.undertow.websockets.spi.WebSocketHttpExchange webSocketHttpExchange)
      Build a new instance.
      Parameters:
      webSocketHttpExchange - Current WebSocket server exchange
      Since:
      1.3.0
  • Method Details

    • acceptContentType

      public boolean acceptContentType(String contentType)
      Description copied from interface: WebSocketRequest
      Checks if the current request accept a specific content type.
      Specified by:
      acceptContentType in interface WebSocketRequest
      Parameters:
      contentType - The content type
      Returns:
      true if the content type is accepted, otherwise, false
    • getHeader

      public String getHeader(String headerName)
      Description copied from interface: WebSocketRequest
      Returns a single header.
      Specified by:
      getHeader in interface WebSocketRequest
      Parameters:
      headerName - The header name
      Returns:
      The requested header value, otherwise, a null value
    • getHeaders

      public Map<String,List<String>> getHeaders()
      Description copied from interface: WebSocketRequest
      Returns all headers.
      Specified by:
      getHeaders in interface WebSocketRequest
      Returns:
      All headers
    • getQueryString

      public String getQueryString()
      Description copied from interface: WebSocketRequest
      Returns the query string, without the leading "?".
      Specified by:
      getQueryString in interface WebSocketRequest
      Returns:
      The query string
    • getQueryStringParameters

      public Map<String,List<String>> getQueryStringParameters()
      Description copied from interface: WebSocketRequest
      Returns all query string parameters.
      Specified by:
      getQueryStringParameters in interface WebSocketRequest
      Returns:
      All query string parameters
    • getQueryStringParameter

      public String getQueryStringParameter(String parameterName)
      Description copied from interface: WebSocketRequest
      Returns the query string parameter value. If the parameter does not exist, null value will be returned.
      Specified by:
      getQueryStringParameter in interface WebSocketRequest
      Parameters:
      parameterName - The parameter name
      Returns:
      The query string parameter value
    • getQueryStringParameter

      public String getQueryStringParameter(String parameterName, String fallbackValue)
      Description copied from interface: WebSocketRequest
      Returns the query string parameter value. If the parameter does not exist or associated value is blank, fallback value will be returned.
      Specified by:
      getQueryStringParameter in interface WebSocketRequest
      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
    • getRequestURI

      public String getRequestURI()
      Description copied from interface: WebSocketRequest
      Returns the original request URI. This is not decoded in any way, and does not include the query string.
      Specified by:
      getRequestURI in interface WebSocketRequest
      Returns:
      The request URI