|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.StunServerDescriptor
public class StunServerDescriptor
A StunServerDescriptor stores information necessary to create a
STUN or TURN candidate harvester that we could use with ICE4J. Descriptors
are normally initialized by protocol wizards. They are then used to convert
the data into a String form suitable for storage in an accounts
properties Map.
| Field Summary | |
|---|---|
static int |
MAX_STUN_SERVER_COUNT
The maximum number of stun servers that we would allow. |
static String |
PROTOCOL_SSLTCP
TCP with SSL protocol (only for Google Talk TURN server). |
static String |
PROTOCOL_TCP
TCP protocol. |
static String |
PROTOCOL_UDP
UDP protocol. |
| Constructor Summary | |
|---|---|
StunServerDescriptor(String address,
int port,
boolean supportTurn,
String username,
String password)
Creates an instance of StunServer by specifying all parameters. |
|
| Method Summary | |
|---|---|
String |
getAddress()
Returns the IP address or FQDN of this server. |
byte[] |
getPassword()
Returns the password associated to this server username. |
int |
getPort()
Returns the port of this server. |
String |
getProtocol()
Returns the protocol associated to this server. |
byte[] |
getUsername()
Returns the username associated to this server. |
boolean |
isOldTurn()
Returns true if the TURN protocol supported is not the RFC5766 ones. |
boolean |
isTurnSupported()
Indicates if TURN is supported by this server. |
static StunServerDescriptor |
loadDescriptor(Map<String,String> props,
String namePrefix)
Loads this descriptor from the specified Map.The method is meant
for use with account property maps. |
void |
setAddress(String address)
Sets the IP address or FQDN of this server. |
void |
setOldTurn(boolean val)
Set the old TURN support. |
void |
setPassword(String password)
Sets the password associated to this server username. |
void |
setPort(int port)
Sets the port corresponding to this server. |
void |
setProtocol(String protocol)
Sets the protocol associated to this server. |
void |
setTurnSupported(boolean turnSupported)
Specifies whether this server can also act as a TURN relay. |
void |
setUsername(String username)
Sets the username associated to this server. |
void |
storeDescriptor(Map<String,String> props,
String namePrefix)
Stores this descriptor into the specified Map.The method is meant
for use with account property maps. |
String |
toString()
Returns a String representation of this descriptor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_STUN_SERVER_COUNT
public static final String PROTOCOL_UDP
public static final String PROTOCOL_TCP
public static final String PROTOCOL_SSLTCP
| Constructor Detail |
|---|
public StunServerDescriptor(String address,
int port,
boolean supportTurn,
String username,
String password)
address - the IP address or FQDN of the STUN serverport - the port of the serversupportTurn - indicates if this STUN server supports TURNusername - the user name for authenticatingpassword - the password| Method Detail |
|---|
public String getAddress()
public void setAddress(String address)
address - the IP address or FQDN to setpublic int getPort()
public void setPort(int port)
port - the port to setpublic boolean isTurnSupported()
public void setTurnSupported(boolean turnSupported)
turnSupported - true to indicate that TURN is supported,
false - otherwisepublic byte[] getUsername()
public void setUsername(String username)
username - the username to setpublic byte[] getPassword()
public void setPassword(String password)
password - the password to set
public void storeDescriptor(Map<String,String> props,
String namePrefix)
Map.The method is meant
for use with account property maps. It also allows prepending an account
prefix to all property names so that multiple descriptors can be stored
in a single Map.
props - the account properties Map that we'd like to store
this descriptor in.namePrefix - the prefix that we should prepend to every property
name.
public static StunServerDescriptor loadDescriptor(Map<String,String> props,
String namePrefix)
Map.The method is meant
for use with account property maps. It also allows prepending an account
prefix to all property names so that multiple descriptors can be read
in a single Map.
props - the account properties Map that we'd like to load
this descriptor from.namePrefix - the prefix that we should prepend to every property
name.
public boolean isOldTurn()
public void setOldTurn(boolean val)
val - value to setpublic String getProtocol()
public void setProtocol(String protocol)
protocol - protocol to setpublic String toString()
toString in class Object
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||