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
Modifier and TypeFieldDescriptionprivate long
The average audio bitrate for a subscriber.private long
The average video bitrate for a subscriber.private String
Secret code of the Subscriberprivate String
Type of block.private long
If this is set, it means user is blocked until this time This is unix timestamp in millisecondsprivate int
Count of subscriber limitprivate boolean
Deprecated, for removal: This API element is subject to removal in a future version.private int
Count of subscriber usageprivate org.bson.types.ObjectId
static final String
static final String
static final String
private String
private SubscriberStats
Deprecated, for removal: This API element is subject to removal in a future version.private String
The stream id of the tokenprivate String
The subscriber id of the subscriberprivate String
Type of subscriber (play or publish). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
long
long
int
int
static String
getStats()
getType()
boolean
boolean
Deprecated, for removal: This API element is subject to removal in a future version.void
setAvgAudioBitrate
(long avgAudioBitrate) void
setAvgVideoBitrate
(long avgVideoBitrate) void
setB32Secret
(String b32Secret) void
setBlockedType
(String blockedType) void
setBlockedUntilUnitTimeStampMs
(long blockedUntilUnitTimeStampMs) void
setConcurrentConnectionsLimit
(int concurrentConnectionsLimit) void
setConnected
(boolean connected) Deprecated, for removal: This API element is subject to removal in a future version.void
setCurrentConcurrentConnections
(int currentConcurrentConnections) void
setRegisteredNodeIp
(String registeredNodeIp) void
setStats
(SubscriberStats stats) void
setStreamId
(String streamId) void
setSubscriberId
(String subscriberId) 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 -
streamId
The stream id of the token -
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
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
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 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.
-
-
Constructor Details
-
Subscriber
public Subscriber()
-
-
Method Details
-
setSubscriberId
-
getSubscriberId
-
setStreamId
-
getStreamId
-
getB32Secret
-
setB32Secret
-
getStats
-
setStats
-
getSubscriberKey
-
getDBKey
-
getType
-
setType
-
isConnected
Deprecated, for removal: This API element is subject to removal in a future version. -
setConnected
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
-
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
-