Record Class MessagingStatus

java.lang.Object
java.lang.Record
com.iantapply.relay.api.MessagingStatus
Record Components:
publisherConnected - whether the publication connection is healthy
subscriberConnected - whether the subscription connection is healthy
node - local node identifier
subscriptions - number of active topic subscriptions
queuedHandlers - handlers waiting for an executor thread
activeHandlers - handlers currently executing
maximumHandlers - maximum number of concurrently executing handlers

public record MessagingStatus(boolean publisherConnected, boolean subscriberConnected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers) extends Record
Point-in-time operational status of a messaging service.
  • Constructor Details

    • MessagingStatus

      public MessagingStatus(boolean connected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers)
      Creates a status for transports that expose only aggregate connectivity.
      Parameters:
      connected - whether both transport roles are connected
      node - local node identifier
      subscriptions - active topic subscriptions
      queuedHandlers - handlers waiting to run
      activeHandlers - handlers currently running
      maximumHandlers - maximum concurrent handlers
    • MessagingStatus

      public MessagingStatus(boolean publisherConnected, boolean subscriberConnected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers)
      Creates an instance of a MessagingStatus record class.
      Parameters:
      publisherConnected - the value for the publisherConnected record component
      subscriberConnected - the value for the subscriberConnected record component
      node - the value for the node record component
      subscriptions - the value for the subscriptions record component
      queuedHandlers - the value for the queuedHandlers record component
      activeHandlers - the value for the activeHandlers record component
      maximumHandlers - the value for the maximumHandlers record component
  • Method Details

    • connected

      public boolean connected()
      Reports whether both sides of the transport are connected.
      Returns:
      true when publication and subscription are healthy
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • publisherConnected

      public boolean publisherConnected()
      Returns the value of the publisherConnected record component.
      Returns:
      the value of the publisherConnected record component
    • subscriberConnected

      public boolean subscriberConnected()
      Returns the value of the subscriberConnected record component.
      Returns:
      the value of the subscriberConnected record component
    • node

      public String node()
      Returns the value of the node record component.
      Returns:
      the value of the node record component
    • subscriptions

      public int subscriptions()
      Returns the value of the subscriptions record component.
      Returns:
      the value of the subscriptions record component
    • queuedHandlers

      public int queuedHandlers()
      Returns the value of the queuedHandlers record component.
      Returns:
      the value of the queuedHandlers record component
    • activeHandlers

      public int activeHandlers()
      Returns the value of the activeHandlers record component.
      Returns:
      the value of the activeHandlers record component
    • maximumHandlers

      public int maximumHandlers()
      Returns the value of the maximumHandlers record component.
      Returns:
      the value of the maximumHandlers record component