Package org.openhab.core.audio
Record Class StreamServed
java.lang.Object
java.lang.Record
org.openhab.core.audio.StreamServed
@NonNullByDefault
public record StreamServed(String url, AudioStream audioStream, AtomicInteger currentlyServedStream, AtomicLong timeout, boolean multiTimeStream, CompletableFuture<@Nullable Void> playEnd)
extends Record
Streams served by the AudioHTTPServer.
- Author:
- Gwendal Roulleau - Initial contribution
-
Constructor Summary
ConstructorDescriptionStreamServed
(String url, AudioStream audioStream, AtomicInteger currentlyServedStream, AtomicLong timeout, boolean multiTimeStream, CompletableFuture<@Nullable Void> playEnd) Creates an instance of aStreamServed
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaudioStream
record component.Returns the value of thecurrentlyServedStream
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themultiTimeStream
record component.CompletableFuture<@Nullable Void>
playEnd()
Returns the value of theplayEnd
record component.timeout()
Returns the value of thetimeout
record component.final String
toString()
Returns a string representation of this record class.url()
Returns the value of theurl
record component.
-
Constructor Details
-
StreamServed
public StreamServed(String url, AudioStream audioStream, AtomicInteger currentlyServedStream, AtomicLong timeout, boolean multiTimeStream, CompletableFuture<@Nullable Void> playEnd) Creates an instance of aStreamServed
record class.- Parameters:
url
- the value for theurl
record componentaudioStream
- the value for theaudioStream
record componentcurrentlyServedStream
- the value for thecurrentlyServedStream
record componenttimeout
- the value for thetimeout
record componentmultiTimeStream
- the value for themultiTimeStream
record componentplayEnd
- the value for theplayEnd
record component
-
-
Method Details
-
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. -
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. -
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 '=='. -
url
Returns the value of theurl
record component.- Returns:
- the value of the
url
record component
-
audioStream
Returns the value of theaudioStream
record component.- Returns:
- the value of the
audioStream
record component
-
currentlyServedStream
Returns the value of thecurrentlyServedStream
record component.- Returns:
- the value of the
currentlyServedStream
record component
-
timeout
Returns the value of thetimeout
record component.- Returns:
- the value of the
timeout
record component
-
multiTimeStream
public boolean multiTimeStream()Returns the value of themultiTimeStream
record component.- Returns:
- the value of the
multiTimeStream
record component
-
playEnd
Returns the value of theplayEnd
record component.- Returns:
- the value of the
playEnd
record component
-