Interface PathController<T,U>

Type Parameters:
T - The type of the request body.
U - The type of the response body.
All Known Implementing Classes:
DynamicPathController, SimplePathController

public sealed interface PathController<T,U> permits SimplePathController<T,U>, DynamicPathController<T,U>
Used to handle requests for a single path.
  • Method Details

    • requestBodyType

      Class<T> requestBodyType()
      Returns:
      The type of the request body.
    • responseBodyType

      Class<U> responseBodyType()
      Returns:
      The type of the response body.
    • requestHandler

      RequestHandler<T,U> requestHandler()
      Returns:
      A function handling the request and returning a response.