Enum Class Message.Type

java.lang.Object
java.lang.Enum<Message.Type>
cl.netswitch.lib.message.Message.Type
All Implemented Interfaces:
Serializable, Comparable<Message.Type>, Constable
Enclosing class:
Message

public static enum Message.Type extends Enum<Message.Type>
Defines the possible types of a Message.
  • Enum Constant Details

    • Connect

      public static final Message.Type Connect
      Connect message.
    • Initialize

      public static final Message.Type Initialize
      Initialize message.
    • Request

      public static final Message.Type Request
      Request message.
    • Reply

      public static final Message.Type Reply
      Reply message.
    • Multicast

      public static final Message.Type Multicast
      Multicast message.
    • PollEnq

      public static final Message.Type PollEnq
      Poll enquiry message.
    • PollAck

      public static final Message.Type PollAck
      Poll acknowledge message.
    • RunStart

      public static final Message.Type RunStart
      Run start message.
    • RunClose

      public static final Message.Type RunClose
      Run close message.
    • Stop

      public static final Message.Type Stop
      Stop message.
  • Method Details

    • values

      public static Message.Type[] 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 Message.Type 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
    • getCode

      public int getCode()
      Returns the unique code of the Type.
      Returns:
      the unique code of the Type.
    • fromCode

      public static Message.Type fromCode(int code)
      Returns the Type with the specified unique code.
      Parameters:
      code - the unique code of the required Type.
      Returns:
      the Type item indexed by supplied code.
      Throws:
      IllegalArgumentException - if code is out-of-range.