public abstract class IceControlAttribute extends Attribute
Modifier and Type | Field and Description |
---|---|
(package private) static char |
DATA_LENGTH_ICE_CONTROL
The length of the data contained in this attribute
|
(package private) boolean |
isControlling
Indicates whether this is an ICE-CONTROLLING or an
ICE-CONTROLLED attribute.
|
(package private) long |
tieBreaker
The tie-breaker value stored in this attribute
|
ALTERNATE_SERVER, attributeType, CHANGE_REQUEST, CHANGED_ADDRESS, CHANNEL_NUMBER, CONNECTION_ID, DATA, DESTINATION_ADDRESS, DONT_FRAGMENT, ERROR_CODE, EVEN_PORT, FINGERPRINT, HEADER_LENGTH, ICE_CONTROLLED, ICE_CONTROLLING, LIFETIME, MAGIC_COOKIE, MAPPED_ADDRESS, MESSAGE_INTEGRITY, NONCE, PASSWORD, PRIORITY, REALM, REFLECTED_FROM, REMOTE_ADDRESS, REQUESTED_ADDRESS_FAMILY, REQUESTED_TRANSPORT, RESERVATION_TOKEN, RESPONSE_ADDRESS, SOFTWARE, SOURCE_ADDRESS, UNKNOWN_ATTRIBUTES, UNKNOWN_OPTIONAL_ATTRIBUTE, USE_CANDIDATE, USERNAME, XOR_MAPPED_ADDRESS, XOR_ONLY, XOR_PEER_ADDRESS, XOR_RELAYED_ADDRESS
Constructor and Description |
---|
IceControlAttribute(boolean isControlling)
Constructs an ICE-CONTROLLING or an ICE-CONTROLLED attribute depending
on the value of isControlling.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
decodeAttributeBody(byte[] attributeValue,
char offset,
char length)
Sets this attribute's fields according to attributeValue array.
|
byte[] |
encode()
Returns a binary representation of this attribute.
|
boolean |
equals(Object obj)
Compares two STUN Attributes.
|
char |
getDataLength()
Returns the data length of this attribute
|
String |
getName()
Returns the human readable name of this attribute.
|
long |
getTieBreaker()
Returns the value of the tie-breaker.
|
void |
setTieBreaker(long tieBreaker)
Sets the tie-breaker value.
|
getAttributeType, getLocationInMessage, setAttributeType, setLocationInMessage
static final char DATA_LENGTH_ICE_CONTROL
long tieBreaker
boolean isControlling
IceControlAttribute(boolean isControlling)
isControlling
- indicates the kind of attribute we are trying to
createvoid decodeAttributeBody(byte[] attributeValue, char offset, char length) throws StunException
decodeAttributeBody
in class Attribute
attributeValue
- a binary array containing this attribute's field
values and NOT containing the attribute header.offset
- the position where attribute values begin (most often
offset is equal to the index of the first byte after
length)length
- the length of the attribute data.StunException
- if attrubteValue contains invalid data.public byte[] encode()
public boolean equals(Object obj)
public char getDataLength()
getDataLength
in class Attribute
public String getName()
public void setTieBreaker(long tieBreaker)
tieBreaker
- the the tie-breaker valuepublic long getTieBreaker()
Copyright © 2018. All rights reserved.