Enum Class Common

java.lang.Object
java.lang.Enum<Common>
httpserver.handlers.Common
All Implemented Interfaces:
Serializable, Comparable<Common>, Constable

public enum Common extends Enum<Common>
  • Method Details

    • values

      public static Common[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Common valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • staticHtml

      public static HttpHandler staticHtml(String content)
    • matchesEtag

      public static boolean matchesEtag(HttpServerExchange request, String etag)
    • checkEtag

      public static void checkEtag(String etag, HttpServerExchange exchange, HttpHandler next) throws Exception
      Throws:
      Exception
    • html404

      public static HttpHandler html404(String html)
    • statusCode

      public static HttpHandler statusCode(int code)
    • redirect

      public static HttpHandler redirect(String url)
    • noSuchApiEndpoint

      public static HttpHandler noSuchApiEndpoint()
    • securityHeaders

      public static HttpHandler securityHeaders(boolean isSecure, HttpHandler next)