fm.liveswitch.DataStreamStats Class Reference

Data stream stats. More...

Public Member Functions

 DataStreamStats ()
 
long getBytesReceived ()
 Gets the number of bytes received. More...
 
long getBytesSent ()
 Gets the number of bytes sent. More...
 
fm.liveswitch.DataChannelStats getChannel ()
 Gets the first channel's stats. More...
 
fm.liveswitch.DataChannelStats getChannel (String channelId)
 Gets a channel by its identifier. More...
 
fm.liveswitch.DataChannelStats[] getChannels ()
 Gets the channels' stats. More...
 
fm.liveswitch.DataChannelStats getDataChannel ()
 Gets the first channel's stats. More...
 
fm.liveswitch.DataChannelStats getDataChannel (String dataChannelId)
 Gets a channel by its identifier. More...
 
fm.liveswitch.DataChannelStats[] getDataChannels ()
 Gets the channels' stats. More...
 
long getMessagesReceived ()
 Gets the number of messages received. More...
 
long getMessagesSent ()
 Gets the number of messages sent. More...
 
String toJson ()
 Serializes this to JSON. More...
 
- Public Member Functions inherited from fm.liveswitch.StreamStats
boolean getIsHost ()
 Gets whether the transport's active candidate pair has a host candidate. More...
 
boolean getIsReflexive ()
 Gets whether the transport's active candidate pair has a reflexive candidate. More...
 
boolean getIsRelayed ()
 Gets whether the transport's active candidate pair has a relayed candidate. More...
 
fm.liveswitch.TransportStats getTransport ()
 Gets the transport's stats. More...
 
fm.liveswitch.StreamType getType ()
 Gets the type. More...
 
- Public Member Functions inherited from fm.liveswitch.BaseStats
String getId ()
 Gets the identifier of the object generating these stats. More...
 
java.util.Date getTimestamp ()
 Gets the timestamp when these stats were generated. More...
 

Static Public Member Functions

static fm.liveswitch.DataStreamStats fromJson (String dataStreamJson)
 Derializes data stream stats from JSON. More...
 
static fm.liveswitch.DataStreamStats[] fromJsonArray (String dataStreamsJson)
 Derializes an array of data stream stats from JSON. More...
 
static String toJson (fm.liveswitch.DataStreamStats dataStream)
 Serializes data stream stats to JSON. More...
 
static String toJsonArray (fm.liveswitch.DataStreamStats[] dataStreams)
 Serializes an array of data stream stats to JSON. More...
 

Protected Member Functions

void deserializeProperties (String key, String valueJson)
 Deserializes the properties. More...
 
void serializeProperties (java.util.HashMap< String, String > jsonObject)
 Serializes the properties. More...
 
- Protected Member Functions inherited from fm.liveswitch.StreamStats
 StreamStats ()
 
- Protected Member Functions inherited from fm.liveswitch.BaseStats
 BaseStats ()
 

Detailed Description

Data stream stats.

Constructor & Destructor Documentation

◆ DataStreamStats()

fm.liveswitch.DataStreamStats.DataStreamStats ( )

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.DataStreamStats.deserializeProperties ( String  key,
String  valueJson 
)
protected

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.StreamStats.

◆ fromJson()

static fm.liveswitch.DataStreamStats fm.liveswitch.DataStreamStats.fromJson ( String  dataStreamJson)
static

Derializes data stream stats from JSON.

Parameters
dataStreamJsonThe data stream's stats JSON.

◆ fromJsonArray()

static fm.liveswitch.DataStreamStats [] fm.liveswitch.DataStreamStats.fromJsonArray ( String  dataStreamsJson)
static

Derializes an array of data stream stats from JSON.

Parameters
dataStreamsJsonThe data streams' stats JSON.

◆ getBytesReceived()

long fm.liveswitch.DataStreamStats.getBytesReceived ( )

Gets the number of bytes received.

◆ getBytesSent()

long fm.liveswitch.DataStreamStats.getBytesSent ( )

Gets the number of bytes sent.

◆ getChannel() [1/2]

fm.liveswitch.DataChannelStats fm.liveswitch.DataStreamStats.getChannel ( )

Gets the first channel's stats.

◆ getChannel() [2/2]

fm.liveswitch.DataChannelStats fm.liveswitch.DataStreamStats.getChannel ( String  channelId)

Gets a channel by its identifier.

Parameters
channelIdThe channel identifier.

◆ getChannels()

fm.liveswitch.DataChannelStats [] fm.liveswitch.DataStreamStats.getChannels ( )

Gets the channels' stats.

◆ getDataChannel() [1/2]

fm.liveswitch.DataChannelStats fm.liveswitch.DataStreamStats.getDataChannel ( )

Gets the first channel's stats.

Deprecated:
Use Channel instead.

◆ getDataChannel() [2/2]

fm.liveswitch.DataChannelStats fm.liveswitch.DataStreamStats.getDataChannel ( String  dataChannelId)

Gets a channel by its identifier.

Parameters
dataChannelIdThe channel identifier.
Deprecated:
Use GetChannel instead.

◆ getDataChannels()

fm.liveswitch.DataChannelStats [] fm.liveswitch.DataStreamStats.getDataChannels ( )

Gets the channels' stats.

Deprecated:
Use Channels instead.

◆ getMessagesReceived()

long fm.liveswitch.DataStreamStats.getMessagesReceived ( )

Gets the number of messages received.

◆ getMessagesSent()

long fm.liveswitch.DataStreamStats.getMessagesSent ( )

Gets the number of messages sent.

◆ serializeProperties()

void fm.liveswitch.DataStreamStats.serializeProperties ( java.util.HashMap< String, String >  jsonObject)
protected

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.StreamStats.

◆ toJson() [1/2]

String fm.liveswitch.DataStreamStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.DataStreamStats.toJson ( fm.liveswitch.DataStreamStats  dataStream)
static

Serializes data stream stats to JSON.

Parameters
dataStreamThe data stream's stats.

◆ toJsonArray()

static String fm.liveswitch.DataStreamStats.toJsonArray ( fm.liveswitch.DataStreamStats[]  dataStreams)
static

Serializes an array of data stream stats to JSON.

Parameters
dataStreamsThe data streams' stats.