Interface Rest.Route

Enclosing class:
Rest
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 static interface Rest.Route
Represents a route (function).
Author:
Holger Eichelberger, SSE
  • Method Summary

    Modifier and Type
    Method
    Description
    handle(Rest.Request request, Rest.Response response)
    Invoked when a request is made on this route's corresponding path e.g.
  • Method Details

    • handle

      Object handle(Rest.Request request, Rest.Response response) throws IOException
      Invoked when a request is made on this route's corresponding path e.g. '/hello'
      Parameters:
      request - The request object providing information about the HTTP request
      response - The response object providing functionality for modifying the response
      Returns:
      The content to be set in the response
      Throws:
      IOException - if an I/O issue occurs