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
ConstructorsConstructorDescriptionStreamServed(String url, AudioStream audioStream, AtomicInteger currentlyServedStream, AtomicLong timeout, boolean multiTimeStream, CompletableFuture<@Nullable Void> playEnd) Creates an instance of aStreamServedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaudioStreamrecord component.Returns the value of thecurrentlyServedStreamrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themultiTimeStreamrecord component.CompletableFuture<@Nullable Void> playEnd()Returns the value of theplayEndrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
StreamServed
public StreamServed(String url, AudioStream audioStream, AtomicInteger currentlyServedStream, AtomicLong timeout, boolean multiTimeStream, CompletableFuture<@Nullable Void> playEnd) Creates an instance of aStreamServedrecord class.- Parameters:
url- the value for theurlrecord componentaudioStream- the value for theaudioStreamrecord componentcurrentlyServedStream- the value for thecurrentlyServedStreamrecord componenttimeout- the value for thetimeoutrecord componentmultiTimeStream- the value for themultiTimeStreamrecord componentplayEnd- the value for theplayEndrecord 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 theurlrecord component.- Returns:
- the value of the
urlrecord component
-
audioStream
Returns the value of theaudioStreamrecord component.- Returns:
- the value of the
audioStreamrecord component
-
currentlyServedStream
Returns the value of thecurrentlyServedStreamrecord component.- Returns:
- the value of the
currentlyServedStreamrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
multiTimeStream
public boolean multiTimeStream()Returns the value of themultiTimeStreamrecord component.- Returns:
- the value of the
multiTimeStreamrecord component
-
playEnd
Returns the value of theplayEndrecord component.- Returns:
- the value of the
playEndrecord component
-