Record Class Reply

java.lang.Object
java.lang.Record
ch.rasc.jcentserverclient.models.Reply

public record Reply(Error error, PublishResult publish, BroadcastResult broadcast, SubscribeResult subscribe, UnsubscribeResult unsubscribe, DisconnectResult disconnect, PresenceResult presence, PresenceStatsResult presenceStats, HistoryResult history, HistoryRemoveResult historyRemove, InfoResult info, RefreshResult refresh, ChannelsResult channels) extends Record
Reply object for batch operations.
  • Constructor Details

    • Reply

      public Reply(Error error, PublishResult publish, BroadcastResult broadcast, SubscribeResult subscribe, UnsubscribeResult unsubscribe, DisconnectResult disconnect, PresenceResult presence, PresenceStatsResult presenceStats, HistoryResult history, HistoryRemoveResult historyRemove, InfoResult info, RefreshResult refresh, ChannelsResult channels)
      Creates an instance of a Reply record class.
      Parameters:
      error - the value for the error record component
      publish - the value for the publish record component
      broadcast - the value for the broadcast record component
      subscribe - the value for the subscribe record component
      unsubscribe - the value for the unsubscribe record component
      disconnect - the value for the disconnect record component
      presence - the value for the presence record component
      presenceStats - the value for the presenceStats record component
      history - the value for the history record component
      historyRemove - the value for the historyRemove record component
      info - the value for the info record component
      refresh - the value for the refresh record component
      channels - the value for the channels record component
  • Method Details

    • builder

      public static Reply.Builder builder()
    • hasError

      public boolean hasError()
      Check if the reply has an error.
      Returns:
      true if there is an error, false otherwise
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • error

      public Error error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component
    • publish

      public PublishResult publish()
      Returns the value of the publish record component.
      Returns:
      the value of the publish record component
    • broadcast

      public BroadcastResult broadcast()
      Returns the value of the broadcast record component.
      Returns:
      the value of the broadcast record component
    • subscribe

      public SubscribeResult subscribe()
      Returns the value of the subscribe record component.
      Returns:
      the value of the subscribe record component
    • unsubscribe

      public UnsubscribeResult unsubscribe()
      Returns the value of the unsubscribe record component.
      Returns:
      the value of the unsubscribe record component
    • disconnect

      public DisconnectResult disconnect()
      Returns the value of the disconnect record component.
      Returns:
      the value of the disconnect record component
    • presence

      public PresenceResult presence()
      Returns the value of the presence record component.
      Returns:
      the value of the presence record component
    • presenceStats

      public PresenceStatsResult presenceStats()
      Returns the value of the presenceStats record component.
      Returns:
      the value of the presenceStats record component
    • history

      public HistoryResult history()
      Returns the value of the history record component.
      Returns:
      the value of the history record component
    • historyRemove

      public HistoryRemoveResult historyRemove()
      Returns the value of the historyRemove record component.
      Returns:
      the value of the historyRemove record component
    • info

      public InfoResult info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component
    • refresh

      public RefreshResult refresh()
      Returns the value of the refresh record component.
      Returns:
      the value of the refresh record component
    • channels

      public ChannelsResult channels()
      Returns the value of the channels record component.
      Returns:
      the value of the channels record component