Enum HttpMethod

java.lang.Object
java.lang.Enum<HttpMethod>
net.aifusion.cimserver.HttpMethod
All Implemented Interfaces:
Serializable, Comparable<HttpMethod>, java.lang.constant.Constable

public enum HttpMethod extends Enum<HttpMethod>
Class to manage known HTTP Methods. See RFC 7231 Section 4
Author:
Sharad Singhal
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Establish a tunnel to the server identified by the target resource
    Remove all current representations of the target resource
    Transfer a current representation of the target resource
    Same as GET, but only transfer the status line and header section
    Describe the communication options for the target resource
    Perform resource-specific processing on the request payload
    Replace all current representations of the target resource with the request payload
    Perform a message loop-back test along the path to the target resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    static HttpMethod
    lookup(String method)
    Get an HttpMethod corresponding to the given string
    static HttpMethod
    Returns the enum constant of this type with the specified name.
    static HttpMethod[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • GET

      public static final HttpMethod GET
      Transfer a current representation of the target resource
    • POST

      public static final HttpMethod POST
      Perform resource-specific processing on the request payload
    • PUT

      public static final HttpMethod PUT
      Replace all current representations of the target resource with the request payload
    • DELETE

      public static final HttpMethod DELETE
      Remove all current representations of the target resource
    • CONNECT

      public static final HttpMethod CONNECT
      Establish a tunnel to the server identified by the target resource
    • OPTIONS

      public static final HttpMethod OPTIONS
      Describe the communication options for the target resource
    • TRACE

      public static final HttpMethod TRACE
      Perform a message loop-back test along the path to the target resource.
  • Method Details

    • values

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

      public static HttpMethod valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • lookup

      public static HttpMethod lookup(String method)
      Get an HttpMethod corresponding to the given string
      Parameters:
      method - - case insensitive string to match. Note that RFC 7231 Section 4.1 recommends all uppercase strings be used for standard methods
      Returns:
      - corresponding HttpMethod. Null if none found