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 ofLocalDataTrackandRemoteDataTrack.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataTrack(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 intgetMaxPacketLifeTime()Returns the maximum period of time in milliseconds in which retransmissions will be sent.intgetMaxRetransmits()Returns the maximum number of times to transmit a message before giving up.java.lang.StringgetName()Returns the data track name.booleanisEnabled()Check if this data track is enabled.booleanisOrdered()Returns true if data track guarantees in-order delivery of messages.booleanisReliable()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. Returns65535ifDataTrackOptions.DEFAULT_MAX_PACKET_LIFE_TIMEwas specified when building the data track.
-
getMaxRetransmits
public int getMaxRetransmits()
Returns the maximum number of times to transmit a message before giving up. Returns65535ifDataTrackOptions.DEFAULT_MAX_RETRANSMITSwas specified when building the data track.
-
-