Enum CoAP.Type

java.lang.Object
java.lang.Enum<CoAP.Type>
org.eclipse.californium.core.coap.CoAP.Type
All Implemented Interfaces:
Serializable, Comparable<CoAP.Type>
Enclosing class:
CoAP

public static enum CoAP.Type extends Enum<CoAP.Type>
CoAP defines four types of messages: Confirmable, Non-confirmable, Acknowledgment, Reset.
  • Enum Constant Details

    • CON

      public static final CoAP.Type CON
      The Confirmable.
    • NON

      public static final CoAP.Type NON
      The Non-confirmable.
    • ACK

      public static final CoAP.Type ACK
      The Acknowledgment.
    • RST

      public static final CoAP.Type RST
      The Reject.
  • Field Details

    • value

      public final int value
      The integer value of a message type.
  • Method Details

    • values

      public static CoAP.Type[] 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 CoAP.Type 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
    • valueOf

      public static CoAP.Type valueOf(int value)
      Converts an integer into its corresponding message type.
      Parameters:
      value - the integer value
      Returns:
      the message type
      Throws:
      IllegalArgumentException - if the integer value is unrecognized