Enum Class MessageRole

java.lang.Object
java.lang.Enum<MessageRole>
ch.nolix.baseapi.net.level2serverprotocol.MessageRole
All Implemented Interfaces:
Serializable, Comparable<MessageRole>, Constable

public enum MessageRole extends Enum<MessageRole>
Author:
Silvan Wyss
  • Enum Constant Details

    • TARGET_APPLICATION_MESSAGE

      public static final MessageRole TARGET_APPLICATION_MESSAGE
    • RESPONSE_EXPECTING_MESSAGE

      public static final MessageRole RESPONSE_EXPECTING_MESSAGE
    • SUCCESS_RESPONSE

      public static final MessageRole SUCCESS_RESPONSE
    • ERROR_RESPONSE

      public static final MessageRole ERROR_RESPONSE
  • Method Details

    • values

      public static MessageRole[] 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 MessageRole 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
    • fromPrefix

      public static MessageRole fromPrefix(char prefix)
      Parameters:
      prefix -
      Returns:
      a new MessageRole from the given prefix
      Throws:
      IllegalArgumentException - if the given prefix does not represent a MessageRole.
    • getPrefix

      public char getPrefix()
      Returns:
      the prefix of the current MessageRole.