Interface CometDRequest


public interface CometDRequest

An abstraction over HTTP requests.

This abstraction allows CometD to be independent from Servlet, or server-specific HTTP APIs.

  • Method Details Link icon

    • getMethod Link icon

      String getMethod()
      Returns:
      the HTTP method
    • getProtocol Link icon

      String getProtocol()
      Returns:
      the HTTP protocol version
    • getParameterValues Link icon

      List<String> getParameterValues(String name)
      Parameters:
      name - the query parameter name
      Returns:
      the values of the given query parameter
    • getCharacterEncoding Link icon

      String getCharacterEncoding()
      Returns:
      the charset of the request body
    • getCookie Link icon

      String getCookie(String name)
      Returns:
      the value of the request cookie with the given name, or null if there is no such cookie
    • getInput Link icon

      Returns:
      the input to read the request body from
    • getAttribute Link icon

      Object getAttribute(String name)
      Parameters:
      name - the attribute name
      Returns:
      the value of the attribute with the given name, or null if not such attribute exists
    • setAttribute Link icon

      void setAttribute(String name, Object value)
      Parameters:
      name - the attribute name
      value - the attribute value
    • addFailureHandler Link icon

      void addFailureHandler(Consumer<Throwable> handler)

      Adds the given handler function to be invoked when a failure is detected for this request.

      Parameters:
      handler - the failure handler function