Package com.twilio.video
Class DataTrack
- java.lang.Object
-
- com.twilio.video.DataTrack
-
- All Implemented Interfaces:
Track
- Direct Known Subclasses:
LocalDataTrack
,RemoteDataTrack
public abstract class DataTrack extends java.lang.Object implements Track
Base representation ofLocalDataTrack
andRemoteDataTrack
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataTrack(boolean enabled, boolean ordered, boolean reliable, int maxPacketLifeTime, int maxRetransmits, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxPacketLifeTime()
Returns the maximum period of time in milliseconds in which retransmissions will be sent.int
getMaxRetransmits()
Returns the maximum number of times to transmit a message before giving up.java.lang.String
getName()
Returns the data track name.boolean
isEnabled()
Check if this data track is enabled.boolean
isOrdered()
Returns true if data track guarantees in-order delivery of messages.boolean
isReliable()
Returns true if the data track guarantees reliable transmission of messages.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Check if this data track is enabled.
-
getName
@NonNull public java.lang.String getName()
Returns the data track name. A pseudo random string is returned if no track name was specified.
-
isOrdered
public boolean isOrdered()
Returns true if data track guarantees in-order delivery of messages.
-
isReliable
public boolean isReliable()
Returns true if the data track guarantees reliable transmission of messages.
-
getMaxPacketLifeTime
public int getMaxPacketLifeTime()
Returns the maximum period of time in milliseconds in which retransmissions will be sent. Returns65535
ifDataTrackOptions.DEFAULT_MAX_PACKET_LIFE_TIME
was specified when building the data track.
-
getMaxRetransmits
public int getMaxRetransmits()
Returns the maximum number of times to transmit a message before giving up. Returns65535
ifDataTrackOptions.DEFAULT_MAX_RETRANSMITS
was specified when building the data track.
-
-