Class Subscriber

java.lang.Object
io.antmedia.datastore.db.types.Subscriber

@Entity("subscriber") @Index(fields=@Field("subscriberId")) @Index(fields=@Field("streamId")) public class Subscriber extends Object
  • Field Details

    • PLAY_TYPE

      public static final String PLAY_TYPE
      See Also:
    • PUBLISH_TYPE

      public static final String PUBLISH_TYPE
      See Also:
    • PUBLISH_AND_PLAY_TYPE

      public static final String PUBLISH_AND_PLAY_TYPE
      See Also:
    • dbId

      @Id private org.bson.types.ObjectId dbId
    • subscriberId

      private String subscriberId
      The subscriber id of the subscriber
    • streamId

      private String streamId
      The stream id of the token
    • stats

      @Deprecated(forRemoval=true, since="2.12.0") private SubscriberStats stats
      Deprecated, for removal: This API element is subject to removal in a future version.
      Stats for this subscriber. Get connection events directly instead of SubscriberStats
    • b32Secret

      private String b32Secret
      Secret code of the Subscriber
    • type

      private String type
      Type of subscriber (play or publish). Pay attention that 'publish' type can also play the streams for making easy to join video conferencing
    • connected

      @Deprecated(since="2.4.3", forRemoval=true) private boolean connected
      Deprecated, for removal: This API element is subject to removal in a future version.
      Is subscriber connected TODO: Write what the recommend way is to get this information? Let's write some comments when we deprecate something
    • currentConcurrentConnections

      private int currentConcurrentConnections
      Count of subscriber usage
    • concurrentConnectionsLimit

      private int concurrentConnectionsLimit
      Count of subscriber limit
    • blockedType

      private String blockedType
      Type of block. It can be publish, play or publish_play in static field: PLAY_TYPE, PUBLISH_TYPE, PUBLISH_AND_PLAY_TYPE
    • blockedUntilUnitTimeStampMs

      private long blockedUntilUnitTimeStampMs
      If this is set, it means user is blocked until this time This is unix timestamp in milliseconds
    • registeredNodeIp

      private String registeredNodeIp
    • avgVideoBitrate

      private long avgVideoBitrate
      The average video bitrate for a subscriber.
    • avgAudioBitrate

      private long avgAudioBitrate
      The average audio bitrate for a subscriber.
  • Constructor Details

    • Subscriber

      public Subscriber()
  • Method Details

    • setSubscriberId

      public void setSubscriberId(String subscriberId)
    • getSubscriberId

      public String getSubscriberId()
    • setStreamId

      public void setStreamId(String streamId)
    • getStreamId

      public String getStreamId()
    • getB32Secret

      public String getB32Secret()
    • setB32Secret

      public void setB32Secret(String b32Secret)
    • getStats

      public SubscriberStats getStats()
    • setStats

      public void setStats(SubscriberStats stats)
    • getSubscriberKey

      public String getSubscriberKey()
    • getDBKey

      public static String getDBKey(String streamId, String subscriberId)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • isConnected

      @Deprecated(since="2.4.3", forRemoval=true) public boolean isConnected()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setConnected

      @Deprecated(since="2.4.3", forRemoval=true) public void setConnected(boolean connected)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCurrentConcurrentConnections

      public int getCurrentConcurrentConnections()
    • setCurrentConcurrentConnections

      public void setCurrentConcurrentConnections(int currentConcurrentConnections)
    • getConcurrentConnectionsLimit

      public int getConcurrentConnectionsLimit()
    • setConcurrentConnectionsLimit

      public void setConcurrentConnectionsLimit(int concurrentConnectionsLimit)
    • getRegisteredNodeIp

      public String getRegisteredNodeIp()
    • setRegisteredNodeIp

      public void setRegisteredNodeIp(String registeredNodeIp)
    • isBlocked

      public boolean isBlocked(String type)
    • getBlockedType

      public String getBlockedType()
    • setBlockedType

      public void setBlockedType(String blockedType)
    • getBlockedUntilUnitTimeStampMs

      public long getBlockedUntilUnitTimeStampMs()
    • setBlockedUntilUnitTimeStampMs

      public void setBlockedUntilUnitTimeStampMs(long blockedUntilUnitTimeStampMs)
    • getAvgVideoBitrate

      public long getAvgVideoBitrate()
      Returns:
      the avgVideoBitrate
    • setAvgVideoBitrate

      public void setAvgVideoBitrate(long avgVideoBitrate)
      Parameters:
      avgVideoBitrate - the avgVideoBitrate to set
    • getAvgAudioBitrate

      public long getAvgAudioBitrate()
      Returns:
      the avgAudioBitrate
    • setAvgAudioBitrate

      public void setAvgAudioBitrate(long avgAudioBitrate)
      Parameters:
      avgAudioBitrate - the avgAudioBitrate to set