Annotation Interface RestServer.Status

Enclosing class:
RestServer

@Retention(RUNTIME) @Documented @Inherited @Target(METHOD) public static @interface RestServer.Status
Status that should be returned. Only use when not setting it explicitly. If an exception is thrown from the method, status is determined based on error handling.

You can use _CODE constants from Status for value().

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Status code to use.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If this is a non-standard status, add a custom reason to it.
  • Element Details

    • value

      int value
      Status code to use.
      Returns:
      status code
    • reason

      String reason
      If this is a non-standard status, add a custom reason to it.
      Returns:
      reason to use
      Default:
      ""