public class JingleNodeDescriptor
extends java.lang.Object
implements java.io.Serializable
String
form suitable for storage
in an accounts properties Map.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JN_ADDRESS
JingleNodes prefix to store server address in configuration.
|
static java.lang.String |
JN_IS_RELAY_SUPPORTED
JingleNodes prefix to store the relay capabilities in configuration.
|
static java.lang.String |
JN_PREFIX
JingleNodes prefix to store configuration.
|
static int |
MAX_JN_RELAY_COUNT
The maximum number of stun servers that we would allow.
|
Constructor and Description |
---|
JingleNodeDescriptor(java.lang.String address,
boolean relaySupported)
Creates an instance of JingleNodes by specifying all
parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getJID()
Returns the address of the JingleNodes
|
boolean |
isRelaySupported()
Returns if the JID has relay support.
|
static JingleNodeDescriptor |
loadDescriptor(java.util.Map<java.lang.String,java.lang.String> props,
java.lang.String namePrefix)
Loads this descriptor from the specified
Map .The method is meant
for use with account property maps. |
void |
setAddress(java.lang.String address)
Sets the address of the JingleNodes.
|
void |
setRelay(boolean relaySupported)
Sets the relay support corresponding to this JID.
|
void |
storeDescriptor(java.util.Map<java.lang.String,java.lang.String> props,
java.lang.String namePrefix)
Stores this descriptor into the specified
Map .The method is meant
for use with account property maps. |
java.lang.String |
toString()
Returns a String representation of this descriptor
|
public static final java.lang.String JN_PREFIX
public static final java.lang.String JN_ADDRESS
public static final java.lang.String JN_IS_RELAY_SUPPORTED
public static final int MAX_JN_RELAY_COUNT
public JingleNodeDescriptor(java.lang.String address, boolean relaySupported)
address
- address of the JingleNodesrelaySupported
- if the JingleNodes supports relaypublic java.lang.String getJID()
public void setAddress(java.lang.String address)
address
- the JID of the JingleNodespublic boolean isRelaySupported()
public void setRelay(boolean relaySupported)
relaySupported
- relay value to setpublic void storeDescriptor(java.util.Map<java.lang.String,java.lang.String> props, java.lang.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 JingleNodeDescriptor loadDescriptor(java.util.Map<java.lang.String,java.lang.String> props, java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.