Record Class SessionUpdate

java.lang.Object
java.lang.Record
lol.trq.orpheus.source.SessionUpdate
Record Components:
sessionId - unique inside the source while the session lives
app - the application behind it
track - what it plays
state - its playback state
positionMillis - the position when it was measured
measuredNanos - when the position was measured, as a System.nanoTime() reading
rate - playback speed
shuffle - shuffle mode
repeat - repeat mode
volume - 0 to 1, or NaN
controls - the commands the session accepts now
cover - the encoded cover, or null
coverUri - a cover location the source did not load, or null

public record SessionUpdate(String sessionId, SourceApp app, Track track, PlaybackState state, long positionMillis, long measuredNanos, double rate, Shuffle shuffle, Repeat repeat, double volume, Set<Control> controls, CoverData cover, String coverUri) extends Record
One session as a source sees it.
  • Constructor Details

    • SessionUpdate

      public SessionUpdate(String sessionId, SourceApp app, Track track, PlaybackState state, long positionMillis, long measuredNanos, double rate, Shuffle shuffle, Repeat repeat, double volume, Set<Control> controls, CoverData cover, String coverUri)
      Creates an instance of a SessionUpdate record class.
      Parameters:
      sessionId - the value for the sessionId record component
      app - the value for the app record component
      track - the value for the track record component
      state - the value for the state record component
      positionMillis - the value for the positionMillis record component
      measuredNanos - the value for the measuredNanos record component
      rate - the value for the rate record component
      shuffle - the value for the shuffle record component
      repeat - the value for the repeat record component
      volume - the value for the volume record component
      controls - the value for the controls record component
      cover - the value for the cover record component
      coverUri - the value for the coverUri record component
  • Method Details

    • 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.
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • app

      public SourceApp app()
      Returns the value of the app record component.
      Returns:
      the value of the app record component
    • track

      public Track track()
      Returns the value of the track record component.
      Returns:
      the value of the track record component
    • state

      public PlaybackState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • positionMillis

      public long positionMillis()
      Returns the value of the positionMillis record component.
      Returns:
      the value of the positionMillis record component
    • measuredNanos

      public long measuredNanos()
      Returns the value of the measuredNanos record component.
      Returns:
      the value of the measuredNanos record component
    • rate

      public double rate()
      Returns the value of the rate record component.
      Returns:
      the value of the rate record component
    • shuffle

      public Shuffle shuffle()
      Returns the value of the shuffle record component.
      Returns:
      the value of the shuffle record component
    • repeat

      public Repeat repeat()
      Returns the value of the repeat record component.
      Returns:
      the value of the repeat record component
    • volume

      public double volume()
      Returns the value of the volume record component.
      Returns:
      the value of the volume record component
    • controls

      public Set<Control> controls()
      Returns the value of the controls record component.
      Returns:
      the value of the controls record component
    • cover

      public CoverData cover()
      Returns the value of the cover record component.
      Returns:
      the value of the cover record component
    • coverUri

      public String coverUri()
      Returns the value of the coverUri record component.
      Returns:
      the value of the coverUri record component