fm.liveswitch.IceServer Class Reference

An ICE server. More...

Public Member Functions

String getHost ()
 Gets the host. More...
 
boolean getIsSecure ()
 Gets a value indicating whether this represents a secure STUN or TURN server. More...
 
boolean getIsStun ()
 Gets a value indicating whether this represents a STUN server. More...
 
boolean getIsTcp ()
 Gets a value indicating whether this represents a TCP server. More...
 
boolean getIsTurn ()
 Gets a value indicating whether this represents a TURN server. More...
 
boolean getIsUdp ()
 Gets a value indicating whether this represents a UDP server. More...
 
String getPassword ()
 Gets the password. More...
 
int getPort ()
 Gets the port. More...
 
String getUrl ()
 Gets the URL. More...
 
String getUsername ()
 Gets the username. More...
 
 IceServer (String url)
 Initializes a new instance of the fm.liveswitch.IceServer class. More...
 
 IceServer (String url, String username, String password)
 Initializes a new instance of the fm.liveswitch.IceServer class. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 

Static Public Member Functions

static fm.liveswitch.IceServer fromJson (String iceServerJson)
 Deserializes an instance from JSON. More...
 
static fm.liveswitch.IceServer[] fromJsonArray (String iceServersJson)
 Deserializes an array of instances from JSON. More...
 
static int getDefaultPort ()
 Gets the default non-secure port (in use for STUN and TURN). More...
 
static int getDefaultStunPort ()
 Gets the default STUN port. More...
 
static int getDefaultStunsPort ()
 Gets the default STUNS port. More...
 
static int getDefaultTurnPort ()
 Gets the default TURN port. More...
 
static int getDefaultTurnsPort ()
 Gets the default TURNS port. More...
 
static String toJson (final fm.liveswitch.IceServer iceServer)
 Serializes an instance to JSON. More...
 
static String toJsonArray (fm.liveswitch.IceServer[] iceServers)
 Serializes an array of instances to JSON. More...
 

Detailed Description

An ICE server.

Constructor & Destructor Documentation

◆ IceServer() [1/2]

fm.liveswitch.IceServer.IceServer ( String  url)

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

Parameters
urlThe URL.

◆ IceServer() [2/2]

fm.liveswitch.IceServer.IceServer ( String  url,
String  username,
String  password 
)

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

Parameters
urlThe URL.
usernameThe username.
passwordThe password.

Member Function Documentation

◆ fromJson()

static fm.liveswitch.IceServer fm.liveswitch.IceServer.fromJson ( String  iceServerJson)
static

Deserializes an instance from JSON.

Parameters
iceServerJsonThe JSON to deserialize.
Returns
The deserialized ICE server.

◆ fromJsonArray()

static fm.liveswitch.IceServer [] fm.liveswitch.IceServer.fromJsonArray ( String  iceServersJson)
static

Deserializes an array of instances from JSON.

Parameters
iceServersJsonThe JSON to deserialize.
Returns
The deserialized ICE server array.

◆ getDefaultPort()

static int fm.liveswitch.IceServer.getDefaultPort ( )
static

Gets the default non-secure port (in use for STUN and TURN).

Deprecated:
Use DefaultStunPort, DefaultTurnPort, DefaultStunsPort, or DefaultTurnsPort instead.

◆ getDefaultStunPort()

static int fm.liveswitch.IceServer.getDefaultStunPort ( )
static

Gets the default STUN port.

◆ getDefaultStunsPort()

static int fm.liveswitch.IceServer.getDefaultStunsPort ( )
static

Gets the default STUNS port.

◆ getDefaultTurnPort()

static int fm.liveswitch.IceServer.getDefaultTurnPort ( )
static

Gets the default TURN port.

◆ getDefaultTurnsPort()

static int fm.liveswitch.IceServer.getDefaultTurnsPort ( )
static

Gets the default TURNS port.

◆ getHost()

String fm.liveswitch.IceServer.getHost ( )

Gets the host.

◆ getIsSecure()

boolean fm.liveswitch.IceServer.getIsSecure ( )

Gets a value indicating whether this represents a secure STUN or TURN server.

◆ getIsStun()

boolean fm.liveswitch.IceServer.getIsStun ( )

Gets a value indicating whether this represents a STUN server.

◆ getIsTcp()

boolean fm.liveswitch.IceServer.getIsTcp ( )

Gets a value indicating whether this represents a TCP server.

◆ getIsTurn()

boolean fm.liveswitch.IceServer.getIsTurn ( )

Gets a value indicating whether this represents a TURN server.

◆ getIsUdp()

boolean fm.liveswitch.IceServer.getIsUdp ( )

Gets a value indicating whether this represents a UDP server.

◆ getPassword()

String fm.liveswitch.IceServer.getPassword ( )

Gets the password.

◆ getPort()

int fm.liveswitch.IceServer.getPort ( )

Gets the port.

◆ getUrl()

String fm.liveswitch.IceServer.getUrl ( )

Gets the URL.

◆ getUsername()

String fm.liveswitch.IceServer.getUsername ( )

Gets the username.

◆ toJson() [1/2]

String fm.liveswitch.IceServer.toJson ( )

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJson() [2/2]

static String fm.liveswitch.IceServer.toJson ( final fm.liveswitch.IceServer  iceServer)
static

Serializes an instance to JSON.

Parameters
iceServerThe ICE server.
Returns
The serialized JSON.

◆ toJsonArray()

static String fm.liveswitch.IceServer.toJsonArray ( fm.liveswitch.IceServer[]  iceServers)
static

Serializes an array of instances to JSON.

Parameters
iceServersThe ICE servers.
Returns
The serialized JSON.