public abstract class ControlAttribute extends StunAttribute
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
controlling |
protected static char |
DATA_LENGTH |
protected static String |
ICE_CONTROLLED_NAME |
protected static String |
ICE_CONTROLLING_NAME |
protected long |
tieBreaker |
ALTERNATE_SERVER, attributeType, CHANGE_REQUEST, CHANGED_ADDRESS, CHANNEL_NUMBER, 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_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| Modifier | Constructor and Description |
|---|---|
protected |
ControlAttribute(boolean isControlling) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decodeAttributeBody(byte[] data,
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 other)
Compares two STUN Attributes.
|
char |
getDataLength()
Returns the length of this attribute's body.
|
String |
getName()
Returns the human readable name of this attribute.
|
long |
getTieBreaker() |
boolean |
isControlling() |
void |
setTieBreaker(long tieBreaker) |
getAttributeType, getLocationInMessage, setAttributeType, setLocationInMessageprotected static final String ICE_CONTROLLED_NAME
protected static final String ICE_CONTROLLING_NAME
protected static final char DATA_LENGTH
protected long tieBreaker
protected boolean controlling
public long getTieBreaker()
public void setTieBreaker(long tieBreaker)
public boolean isControlling()
protected void decodeAttributeBody(byte[] data,
char offset,
char length)
throws StunException
StunAttributedecodeAttributeBody in class StunAttributedata - 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 binary array.StunException - if attrubteValue contains invalid data.public char getDataLength()
StunAttributegetDataLength in class StunAttributepublic String getName()
StunAttributegetName in class StunAttributepublic byte[] encode()
StunAttributeencode in class StunAttributepublic boolean equals(Object other)
StunAttributeequals in class StunAttributeother - the object to compare this attribute with.Copyright © 2017 TeleStax, Inc.. All Rights Reserved.