Record Class Command

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

public record Command(PublishRequest publish, BroadcastRequest broadcast, SubscribeRequest subscribe, UnsubscribeRequest unsubscribe, DisconnectRequest disconnect, PresenceRequest presence, PresenceStatsRequest presenceStats, HistoryRequest history, HistoryRemoveRequest historyRemove, InfoRequest info, RefreshRequest refresh, ChannelsRequest channels) extends Record
Command object for batch operations.
  • Constructor Details

    • Command

      public Command(PublishRequest publish, BroadcastRequest broadcast, SubscribeRequest subscribe, UnsubscribeRequest unsubscribe, DisconnectRequest disconnect, PresenceRequest presence, PresenceStatsRequest presenceStats, HistoryRequest history, HistoryRemoveRequest historyRemove, InfoRequest info, RefreshRequest refresh, ChannelsRequest channels)
      Creates an instance of a Command record class.
      Parameters:
      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 Command.Builder builder()
    • 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.
    • publish

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

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

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

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

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

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

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

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

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

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

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

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