Enum Class MessageType

java.lang.Object
java.lang.Enum<MessageType>
io.fluxzero.common.MessageType
All Implemented Interfaces:
Serializable, Comparable<MessageType>, Constable

public enum MessageType extends Enum<MessageType>
Enumerates the types of messages recognized and routed by the Fluxzero Runtime.

Each message type represents a semantic category of communication, such as commands, events, queries, or errors. These types inform how messages are tracked, handled, and optionally responded to.

Each MessageType has two behavioral flags:

Usage Examples:

  • COMMAND – a state-changing request with an optional result (e.g., CreateUser)
  • EVENT – a broadcast message representing something that happened
  • QUERY – a read-only request expecting a result
  • ERROR – indicates failure of a prior message
  • WEBREQUEST / WEBRESPONSE – HTTP/WebSocket message flows via Fluxzero
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A request to perform an action or change state.
    A message from a custom message topic.
    A message containing an updated search document from a given collection.
    A handler failure in response to a request message or generic system failure.
    A record of something that occurred.
    Internal system event used for diagnostics and monitoring.
    Same as events, but used in a fan-out strategy when a consumer is interested in events across all segments.
    A request for data or read-only information.
    The result of handling a request (e.g. command, query).
    A scheduled message to be delivered at a specific time.
    A tracked web request routed to a handler via HTTP or WebSocket.
    A response to a WEBREQUEST, typically an HTTP or WebSocket reply.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static MessageType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

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

    • COMMAND

      public static final MessageType COMMAND
      A request to perform an action or change state. Usually processed by a command handler and optionally followed by a RESULT.
    • EVENT

      public static final MessageType EVENT
      A record of something that occurred. Does not expect a response.
    • NOTIFICATION

      public static final MessageType NOTIFICATION
      Same as events, but used in a fan-out strategy when a consumer is interested in events across all segments.
    • QUERY

      public static final MessageType QUERY
      A request for data or read-only information. Typically returns a RESULT.
    • RESULT

      public static final MessageType RESULT
      The result of handling a request (e.g. command, query).
    • SCHEDULE

      public static final MessageType SCHEDULE
      A scheduled message to be delivered at a specific time.
    • ERROR

      public static final MessageType ERROR
      A handler failure in response to a request message or generic system failure.
    • METRICS

      public static final MessageType METRICS
      Internal system event used for diagnostics and monitoring.
    • WEBREQUEST

      public static final MessageType WEBREQUEST
      A tracked web request routed to a handler via HTTP or WebSocket. Expects a WEBRESPONSE.
    • WEBRESPONSE

      public static final MessageType WEBRESPONSE
      A response to a WEBREQUEST, typically an HTTP or WebSocket reply.
    • DOCUMENT

      public static final MessageType DOCUMENT
      A message containing an updated search document from a given collection.
    • CUSTOM

      public static final MessageType CUSTOM
      A message from a custom message topic.
  • Method Details

    • values

      public static MessageType[] 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 MessageType 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