Package com.twilio.video
Class DataTrack
java.lang.Object
com.twilio.video.DataTrack
- All Implemented Interfaces:
Track
- Direct Known Subclasses:
LocalDataTrack
,RemoteDataTrack
Base representation of
LocalDataTrack
and RemoteDataTrack
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the maximum period of time in milliseconds in which retransmissions will be sent.int
Returns the maximum number of times to transmit a message before giving up.getName()
Returns the data track name.boolean
Check if this data track is enabled.boolean
Returns true if data track guarantees in-order delivery of messages.boolean
Returns true if the data track guarantees reliable transmission of messages.
-
Constructor Details
-
DataTrack
protected DataTrack(boolean enabled, boolean ordered, boolean reliable, int maxPacketLifeTime, int maxRetransmits, @NonNull String name)
-
-
Method Details
-
isEnabled
public boolean isEnabled()Check if this data track is enabled. -
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.
-