Record Class SessionUpdate
java.lang.Object
java.lang.Record
lol.trq.orpheus.source.SessionUpdate
- Record Components:
sessionId- unique inside the source while the session livesapp- the application behind ittrack- what it playsstate- its playback statepositionMillis- the position when it was measuredmeasuredNanos- when the position was measured, as aSystem.nanoTime()readingrate- playback speedshuffle- shuffle moderepeat- repeat modevolume- 0 to 1, or NaNcontrols- the commands the session accepts nowcover- the encoded cover, or nullcoverUri- 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 Summary
ConstructorsConstructorDescriptionSessionUpdate(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 aSessionUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionapp()Returns the value of theapprecord component.controls()Returns the value of thecontrolsrecord component.cover()Returns the value of thecoverrecord component.coverUri()Returns the value of thecoverUrirecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themeasuredNanosrecord component.longReturns the value of thepositionMillisrecord component.doublerate()Returns the value of theraterecord component.repeat()Returns the value of therepeatrecord component.Returns the value of thesessionIdrecord component.shuffle()Returns the value of theshufflerecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.track()Returns the value of thetrackrecord component.doublevolume()Returns the value of thevolumerecord component.
-
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 aSessionUpdaterecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentapp- the value for theapprecord componenttrack- the value for thetrackrecord componentstate- the value for thestaterecord componentpositionMillis- the value for thepositionMillisrecord componentmeasuredNanos- the value for themeasuredNanosrecord componentrate- the value for theraterecord componentshuffle- the value for theshufflerecord componentrepeat- the value for therepeatrecord componentvolume- the value for thevolumerecord componentcontrols- the value for thecontrolsrecord componentcover- the value for thecoverrecord componentcoverUri- the value for thecoverUrirecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sessionId
-
app
-
track
-
state
-
positionMillis
public long positionMillis()Returns the value of thepositionMillisrecord component.- Returns:
- the value of the
positionMillisrecord component
-
measuredNanos
public long measuredNanos()Returns the value of themeasuredNanosrecord component.- Returns:
- the value of the
measuredNanosrecord component
-
rate
-
shuffle
-
repeat
-
volume
-
controls
-
cover
-
coverUri
-