org.apache.mina.coap

## Enum CoapCode

- java.lang.Object
- - java.lang.Enum<CoapCode>
  - - org.apache.mina.coap.CoapCode

- All Implemented Interfaces:
    Serializable, Comparable<CoapCode>

      public enum CoapCode
      extends Enum<CoapCode>

  Extract of the CoAP RFC :

           |    1 | GET    | [RFCXXXX] |
           |    2 | POST   | [RFCXXXX] |
           |    3 | PUT    | [RFCXXXX] |
           |    4 | DELETE | [RFCXXXX] |

           |   65 | 2.01 Created                    | [RFCXXXX] |
           |   66 | 2.02 Deleted                    | [RFCXXXX] |
           |   67 | 2.03 Valid                      | [RFCXXXX] |
           |   68 | 2.04 Changed                    | [RFCXXXX] |
           |   69 | 2.05 Content                    | [RFCXXXX] |
           |  128 | 4.00 Bad Request                | [RFCXXXX] |
           |  129 | 4.01 Unauthorized               | [RFCXXXX] |
           |  130 | 4.02 Bad Option                 | [RFCXXXX] |
           |  131 | 4.03 Forbidden                  | [RFCXXXX] |
           |  132 | 4.04 Not Found                  | [RFCXXXX] |
           |  133 | 4.05 Method Not Allowed         | [RFCXXXX] |
           |  134 | 4.06 Not Acceptable             | [RFCXXXX] |
           |  140 | 4.12 Precondition Failed        | [RFCXXXX] |
           |  141 | 4.13 Request Entity Too Large   | [RFCXXXX] |
           |  143 | 4.15 Unsupported Content-Format | [RFCXXXX] |
           |  160 | 5.00 Internal Server Error      | [RFCXXXX] |
           |  161 | 5.01 Not Implemented            | [RFCXXXX] |
           |  162 | 5.02 Bad Gateway                | [RFCXXXX] |
           |  163 | 5.03 Service Unavailable        | [RFCXXXX] |
           |  164 | 5.04 Gateway Timeout            | [RFCXXXX] |
           |  165 | 5.05 Proxying Not Supported     | [RFCXXXX] |

  Author:
    Apache MINA Project

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BAD_GATEWAY`
    `BAD_OPTION`
    `BAD_REQUEST`
    `CHANGED`
    `CONTENT`
    `CREATED`
    `DELETE`
    `DELETED`
    `FORBIDDEN`
    `GATEWAY_TIMEOUT`
    `GET`
    `INTERNAL_SERVER_ERROR`
    `METHOD_NOT_ALLOWED`
    `NOT_ACCEPTABLE`
    `NOT_FOUND`
    `NOT_IMPLEMENTED`
    `POST`
    `PRECONDITION_FAILED`
    `PROXYING_NOT_SUPPORTED`
    `PUT`
    `REQUEST_ENTITY_TOO_LARGE`
    `SERVICE_UNAVAILABLE`
    `UNAUTHORIZED`
    `UNSUPPORTED_CONTENT_FORMAT`
    `VALID`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CoapCode` | `fromCode(int code)` Find the `CoapCode` for the given value code (`null` if not found)
    `int` | `getCode()`
    `String` | `getText()`
    `static CoapCode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static CoapCode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### GET

          public static final CoapCode GET

    - #### POST

          public static final CoapCode POST

    - #### PUT

          public static final CoapCode PUT

    - #### DELETE

          public static final CoapCode DELETE

    - #### CREATED

          public static final CoapCode CREATED

    - #### DELETED

          public static final CoapCode DELETED

    - #### VALID

          public static final CoapCode VALID

    - #### CHANGED

          public static final CoapCode CHANGED

    - #### CONTENT

          public static final CoapCode CONTENT

    - #### BAD_REQUEST

          public static final CoapCode BAD_REQUEST

    - #### UNAUTHORIZED

          public static final CoapCode UNAUTHORIZED

    - #### BAD_OPTION

          public static final CoapCode BAD_OPTION

    - #### FORBIDDEN

          public static final CoapCode FORBIDDEN

    - #### NOT_FOUND

          public static final CoapCode NOT_FOUND

    - #### METHOD_NOT_ALLOWED

          public static final CoapCode METHOD_NOT_ALLOWED

    - #### NOT_ACCEPTABLE

          public static final CoapCode NOT_ACCEPTABLE

    - #### PRECONDITION_FAILED

          public static final CoapCode PRECONDITION_FAILED

    - #### REQUEST_ENTITY_TOO_LARGE

          public static final CoapCode REQUEST_ENTITY_TOO_LARGE

    - #### UNSUPPORTED_CONTENT_FORMAT

          public static final CoapCode UNSUPPORTED_CONTENT_FORMAT

    - #### INTERNAL_SERVER_ERROR

          public static final CoapCode INTERNAL_SERVER_ERROR

    - #### NOT_IMPLEMENTED

          public static final CoapCode NOT_IMPLEMENTED

    - #### BAD_GATEWAY

          public static final CoapCode BAD_GATEWAY

    - #### SERVICE_UNAVAILABLE

          public static final CoapCode SERVICE_UNAVAILABLE

    - #### GATEWAY_TIMEOUT

          public static final CoapCode GATEWAY_TIMEOUT

    - #### PROXYING_NOT_SUPPORTED

          public static final CoapCode PROXYING_NOT_SUPPORTED

  - ### Method Detail

    - #### values

          public static CoapCode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (CoapCode c : CoapCode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static CoapCode 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

    - #### getText

          public String getText()

    - #### getCode

          public int getCode()

    - #### fromCode

          public static CoapCode fromCode(int code)

      Find the `CoapCode` for the given value code (`null` if not found)

Copyright © 2009–2013 Apache MINA Project. All rights reserved.