Package io.antmedia.datastore.db.types
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 Summary
FieldsModifier and TypeFieldDescriptionprivate longThe average audio bitrate for a subscriber.private longThe average video bitrate for a subscriber.private StringSecret code of the Subscriberprivate StringType of block.private longIf this is set, it means user is blocked until this time This is unix timestamp in millisecondsprivate intCount of subscriber limitprivate booleanIs subscriber connectedprivate intCount of subscriber usageprivate org.bson.types.ObjectIdstatic final Stringstatic final Stringstatic final Stringprivate Stringprivate StringThe stream id of the tokenprivate StringThe subscriber id of the subscriberprivate StringThe subscriber name of the subscriberprivate IntegerCustom TOTP expiry period in seconds for this subscriber.private StringType of subscriber (play or publish). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglonglongintintstatic StringGets the custom TOTP expiry period in seconds for this subscriber.getType()booleanbooleanvoidsetAvgAudioBitrate(long avgAudioBitrate) voidsetAvgVideoBitrate(long avgVideoBitrate) voidsetB32Secret(String b32Secret) voidsetBlockedType(String blockedType) voidsetBlockedUntilUnitTimeStampMs(long blockedUntilUnitTimeStampMs) voidsetConcurrentConnectionsLimit(int concurrentConnectionsLimit) voidsetConnected(boolean connected) voidsetCurrentConcurrentConnections(int currentConcurrentConnections) voidsetRegisteredNodeIp(String registeredNodeIp) voidsetStreamId(String streamId) voidsetSubscriberId(String subscriberId) voidsetSubscriberName(String subscriberName) voidsetTotpExpiryPeriodSeconds(Integer totpExpiryPeriodSeconds) Sets the custom TOTP expiry period in seconds for this subscriber.void
-
Field Details
-
PLAY_TYPE
- See Also:
-
PUBLISH_TYPE
- See Also:
-
PUBLISH_AND_PLAY_TYPE
- See Also:
-
dbId
@Id private org.bson.types.ObjectId dbId -
subscriberId
The subscriber id of the subscriber -
subscriberName
The subscriber name of the subscriber -
streamId
The stream id of the token -
b32Secret
Secret code of the Subscriber -
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 connectedIs subscriber connected -
currentConcurrentConnections
private int currentConcurrentConnectionsCount of subscriber usage -
concurrentConnectionsLimit
private int concurrentConnectionsLimitCount of subscriber limit -
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 blockedUntilUnitTimeStampMsIf this is set, it means user is blocked until this time This is unix timestamp in milliseconds -
registeredNodeIp
-
avgVideoBitrate
private long avgVideoBitrateThe average video bitrate for a subscriber. -
avgAudioBitrate
private long avgAudioBitrateThe average audio bitrate for a subscriber. -
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
-
getSubscriberId
-
setSubscriberName
-
getSubscriberName
-
setStreamId
-
getStreamId
-
getB32Secret
-
setB32Secret
-
getSubscriberKey
-
getDBKey
-
getType
-
setType
-
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
-
setRegisteredNodeIp
-
isBlocked
-
getBlockedType
-
setBlockedType
-
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
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
Sets the custom TOTP expiry period in seconds for this subscriber.- Parameters:
totpExpiryPeriodSeconds- the expiry period in seconds configurable by the user
-