fm.liveswitch.DataChannelStats Class Reference

Data channel stats. More...

Public Member Functions

 DataChannelStats ()
 Initializes a new instance of fm.liveswitch.DataChannelStats. More...
 
long getBytesReceived ()
 Gets the number of bytes received. More...
 
long getBytesSent ()
 Gets the number of bytes sent. More...
 
String getLabel ()
 Gets the label. More...
 
long getMessagesReceived ()
 Gets the number of messages received. More...
 
long getMessagesSent ()
 Gets the number of messages sent. More...
 
boolean getOrdered ()
 Gets whether the channel is ordered. More...
 
String getProtocol ()
 Gets the protocol. More...
 
fm.liveswitch.DataChannelState getState ()
 Gets the state. More...
 
String toJson ()
 Serializes this to JSON. 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.DataChannelStats fromJson (String dataChannelJson)
 Derializes data channel stats from JSON. More...
 
static fm.liveswitch.DataChannelStats[] fromJsonArray (String dataChannelsJson)
 Derializes an array of data channel stats from JSON. More...
 
static String toJson (fm.liveswitch.DataChannelStats dataChannel)
 Serializes data channel stats to JSON. More...
 
static String toJsonArray (fm.liveswitch.DataChannelStats[] dataChannels)
 Serializes an array of data channel 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.BaseStats
 BaseStats ()
 

Detailed Description

Data channel stats.

Constructor & Destructor Documentation

◆ DataChannelStats()

fm.liveswitch.DataChannelStats.DataChannelStats ( )

Initializes a new instance of fm.liveswitch.DataChannelStats.

Member Function Documentation

◆ deserializeProperties()

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

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.BaseStats.

◆ fromJson()

static fm.liveswitch.DataChannelStats fm.liveswitch.DataChannelStats.fromJson ( String  dataChannelJson)
static

Derializes data channel stats from JSON.

Parameters
dataChannelJsonThe data channel's stats JSON.

◆ fromJsonArray()

static fm.liveswitch.DataChannelStats [] fm.liveswitch.DataChannelStats.fromJsonArray ( String  dataChannelsJson)
static

Derializes an array of data channel stats from JSON.

Parameters
dataChannelsJsonThe data channels' stats JSON.

◆ getBytesReceived()

long fm.liveswitch.DataChannelStats.getBytesReceived ( )

Gets the number of bytes received.

◆ getBytesSent()

long fm.liveswitch.DataChannelStats.getBytesSent ( )

Gets the number of bytes sent.

◆ getLabel()

String fm.liveswitch.DataChannelStats.getLabel ( )

Gets the label.

◆ getMessagesReceived()

long fm.liveswitch.DataChannelStats.getMessagesReceived ( )

Gets the number of messages received.

◆ getMessagesSent()

long fm.liveswitch.DataChannelStats.getMessagesSent ( )

Gets the number of messages sent.

◆ getOrdered()

boolean fm.liveswitch.DataChannelStats.getOrdered ( )

Gets whether the channel is ordered.

◆ getProtocol()

String fm.liveswitch.DataChannelStats.getProtocol ( )

Gets the protocol.

◆ getState()

fm.liveswitch.DataChannelState fm.liveswitch.DataChannelStats.getState ( )

Gets the state.

◆ serializeProperties()

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

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.BaseStats.

◆ toJson() [1/2]

String fm.liveswitch.DataChannelStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.DataChannelStats.toJson ( fm.liveswitch.DataChannelStats  dataChannel)
static

Serializes data channel stats to JSON.

Parameters
dataChannelThe data channel's stats.

◆ toJsonArray()

static String fm.liveswitch.DataChannelStats.toJsonArray ( fm.liveswitch.DataChannelStats[]  dataChannels)
static

Serializes an array of data channel stats to JSON.

Parameters
dataChannelsThe data channels' stats.