Annotation Interface Route


@Retention(RUNTIME) public @interface Route
Annotation for marking methods as route handlers.

A route consists of a path and a method that is executed when the path is requested. The path is defined by the value of the Route annotation. The method must have exactly one parameter of type Request. The method must have a return type of void.

Each Request must be answered with a Response via its answer() method. Responses can be created with the ResponseHelper class.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Retrieves the value of the annotation.
  • Element Details

    • value

      String value
      Retrieves the value of the annotation.
      Returns:
      the value of the annotation