Class DataTrack

java.lang.Object
com.twilio.video.DataTrack
All Implemented Interfaces:
Track
Direct Known Subclasses:
LocalDataTrack, RemoteDataTrack

public abstract class DataTrack extends Object implements Track
Base representation of LocalDataTrack and RemoteDataTrack.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DataTrack(boolean enabled, boolean ordered, boolean reliable, int maxPacketLifeTime, int maxRetransmits, String name)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.
      Specified by:
      isEnabled in interface Track
      Returns:
      true if the track is enabled.
    • getName

      @NonNull public String getName()
      Returns the data track name. A pseudo random string is returned if no track name was specified.
      Specified by:
      getName in interface Track
    • 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. Returns 65535 if DataTrackOptions.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. Returns 65535 if DataTrackOptions.DEFAULT_MAX_RETRANSMITS was specified when building the data track.