Interface ExchangeHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ExchangeHandler
A functional interface representing an HTTP request handler.

Implementations of this interface are responsible for processing incoming HTTP requests and generating appropriate responses. The handle method provides access to a Context object, which encapsulates the request and response details.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Handles the given HTTP request and generates a response.
  • Method Details

    • handle

      void handle(Context ctx) throws Exception
      Handles the given HTTP request and generates a response.

      The Context object provides access to request information such as headers, parameters, and body, as well as methods for constructing and sending the response.

      Parameters:
      ctx - The context object containing the request and response details.
      Throws:
      IOException - if an I/O error occurs during request processing or response generation.
      Exception