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
    • subscriberName

      private String subscriberName
      The subscriber name of the subscriber
    • streamId

      private String streamId
      The stream id of the token
    • 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

      private boolean connected
      Is subscriber connected
    • 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.
    • totpExpiryPeriodSeconds

      private Integer totpExpiryPeriodSeconds
      Custom TOTP expiry period in seconds for this subscriber. If null, falls back to global timeTokenPeriod setting.
  • Constructor Details

    • Subscriber

      public Subscriber()
  • Method Details

    • setSubscriberId

      public void setSubscriberId(String subscriberId)
    • getSubscriberId

      public String getSubscriberId()
    • setSubscriberName

      public void setSubscriberName(String subscriberName)
    • getSubscriberName

      public String getSubscriberName()
    • setStreamId

      public void setStreamId(String streamId)
    • getStreamId

      public String getStreamId()
    • getB32Secret

      public String getB32Secret()
    • setB32Secret

      public void setB32Secret(String b32Secret)
    • getSubscriberKey

      public String getSubscriberKey()
    • getDBKey

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

      public String getType()
    • setType

      public void setType(String type)
    • isConnected

      public boolean isConnected()
    • setConnected

      public void setConnected(boolean connected)
    • 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
    • getTotpExpiryPeriodSeconds

      public Integer getTotpExpiryPeriodSeconds()
      Gets the custom TOTP expiry period in seconds for this subscriber.
      Returns:
      the custom TOTP expiry period in seconds, or null if not set
    • setTotpExpiryPeriodSeconds

      public void setTotpExpiryPeriodSeconds(Integer totpExpiryPeriodSeconds)
      Sets the custom TOTP expiry period in seconds for this subscriber.
      Parameters:
      totpExpiryPeriodSeconds - the expiry period in seconds configurable by the user