fm.liveswitch.CandidateStats Class Reference

Candidate stats. More...

Public Member Functions

 CandidateStats ()
 Initializes a new instance of the fm.liveswitch.CandidateStats class. More...
 
String getIPAddress ()
 Gets the IP address. More...
 
boolean getIsHost ()
 Gets whether the candidate is host/local. More...
 
boolean getIsReflexive ()
 Gets whether the candidate is reflexive. More...
 
boolean getIsRelayed ()
 Gets whether the candidate is relayed. More...
 
int getPort ()
 Gets the port. More...
 
long getPriority ()
 Gets the priority. More...
 
fm.liveswitch.ProtocolType getProtocol ()
 Gets the protocol. More...
 
String getRelatedIPAddress ()
 Gets the related IP address. More...
 
int getRelatedPort ()
 Gets the related port. More...
 
fm.liveswitch.ProtocolType getRelayProtocol ()
 Gets the relay protocol. More...
 
fm.liveswitch.ProtocolType getTurnProtocol ()
 Gets the relay protocol. More...
 
fm.liveswitch.CandidateType getType ()
 Gets the type. More...
 
boolean isEquivalent (fm.liveswitch.CandidateStats instance)
 Checks if a candidate is equivalent to this one. 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...
 
- Public Member Functions inherited from fm.liveswitch.IEquivalent< fm.liveswitch.CandidateStats >
abstract boolean isEquivalent (T instance)
 Checks if an instance is equivalent to this one. More...
 

Static Public Member Functions

static fm.liveswitch.CandidateStats fromJson (String candidateJson)
 Derializes candidate stats from JSON. More...
 
static fm.liveswitch.CandidateStats[] fromJsonArray (String candidatesJson)
 Derializes an array of candidate stats from JSON. More...
 
static String toJson (fm.liveswitch.CandidateStats candidate)
 Serializes candidate stats to JSON. More...
 
static String toJsonArray (fm.liveswitch.CandidateStats[] candidates)
 Serializes an array of candidate 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

Candidate stats.

Constructor & Destructor Documentation

◆ CandidateStats()

fm.liveswitch.CandidateStats.CandidateStats ( )

Initializes a new instance of the fm.liveswitch.CandidateStats class.

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.CandidateStats.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.CandidateStats fm.liveswitch.CandidateStats.fromJson ( String  candidateJson)
static

Derializes candidate stats from JSON.

Parameters
candidateJsonThe candidate's stats JSON.

◆ fromJsonArray()

static fm.liveswitch.CandidateStats [] fm.liveswitch.CandidateStats.fromJsonArray ( String  candidatesJson)
static

Derializes an array of candidate stats from JSON.

Parameters
candidatesJsonThe candidates' stats JSON.

◆ getIPAddress()

String fm.liveswitch.CandidateStats.getIPAddress ( )

Gets the IP address.

◆ getIsHost()

boolean fm.liveswitch.CandidateStats.getIsHost ( )

Gets whether the candidate is host/local.

◆ getIsReflexive()

boolean fm.liveswitch.CandidateStats.getIsReflexive ( )

Gets whether the candidate is reflexive.

◆ getIsRelayed()

boolean fm.liveswitch.CandidateStats.getIsRelayed ( )

Gets whether the candidate is relayed.

◆ getPort()

int fm.liveswitch.CandidateStats.getPort ( )

Gets the port.

◆ getPriority()

long fm.liveswitch.CandidateStats.getPriority ( )

Gets the priority.

◆ getProtocol()

fm.liveswitch.ProtocolType fm.liveswitch.CandidateStats.getProtocol ( )

Gets the protocol.

◆ getRelatedIPAddress()

String fm.liveswitch.CandidateStats.getRelatedIPAddress ( )

Gets the related IP address.

◆ getRelatedPort()

int fm.liveswitch.CandidateStats.getRelatedPort ( )

Gets the related port.

◆ getRelayProtocol()

fm.liveswitch.ProtocolType fm.liveswitch.CandidateStats.getRelayProtocol ( )

Gets the relay protocol.

◆ getTurnProtocol()

fm.liveswitch.ProtocolType fm.liveswitch.CandidateStats.getTurnProtocol ( )

Gets the relay protocol.

Deprecated:
Use RelayProtocol instead.

◆ getType()

fm.liveswitch.CandidateType fm.liveswitch.CandidateStats.getType ( )

Gets the type.

◆ isEquivalent()

boolean fm.liveswitch.CandidateStats.isEquivalent ( fm.liveswitch.CandidateStats  instance)

Checks if a candidate is equivalent to this one.

Parameters
instanceThe candidate.

◆ serializeProperties()

void fm.liveswitch.CandidateStats.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.CandidateStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.CandidateStats.toJson ( fm.liveswitch.CandidateStats  candidate)
static

Serializes candidate stats to JSON.

Parameters
candidateThe candidate's stats.

◆ toJsonArray()

static String fm.liveswitch.CandidateStats.toJsonArray ( fm.liveswitch.CandidateStats[]  candidates)
static

Serializes an array of candidate stats to JSON.

Parameters
candidatesThe candidates' stats.