Annotation Interface HttpRequestHandler


@Documented @Target(METHOD) @Retention(RUNTIME) public @interface HttpRequestHandler
Represents a method which can handle http requests sent to one of the provided paths using and request methods. The first parameter of an annotated method must (and will) be the request HttpContext.
Since:
4.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Get the paths to which the request can be sent in order to call the associated handling method.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Get the methods which can be used to call the associated handling method, defaults to GET.
    int
    Get the port to which this handler is listening to exclusively.
    int
    Get the priority of the associated handling method.
  • Element Details

    • paths

      Get the paths to which the request can be sent in order to call the associated handling method.
      Returns:
      the url paths the associated method is handling.
    • methods

      Get the methods which can be used to call the associated handling method, defaults to GET.
      Returns:
      the http request methods the associated method is handling.
      Default:
      {"GET"}
    • priority

      int priority
      Get the priority of the associated handling method.
      Returns:
      the priority of the handling method.
      Default:
      32
    • port

      int port
      Get the port to which this handler is listening to exclusively.
      Returns:
      the port this handler is listening to.
      Default:
      -1