-
- All Implemented Interfaces:
public class RequestedTransportAttribute extends Attribute
The REQUESTED-TRANSPORT attribute is used to allocate a TURN address of certain transport protocol. In the original TURN specification, only UDP is supported. Support of TCP is detailed in draft-ietf-behave-turn-tcp-07.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringNAMEpublic final static charDATA_LENGTHpublic final static byteUDPpublic final static byteTCP
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Compares two STUN Attributes. StringgetName()Returns the human readable name of this attribute. chargetDataLength()Returns the length of this attribute's body. Array<byte>encode()Returns a binary representation of this attribute. voidsetRequestedTransport(byte transportProtocol)Set the transport protocol. intgetRequestedTransport()Get the transport protocol. -
-
Method Detail
-
equals
boolean equals(Object obj)
Compares two STUN Attributes. Attributes are considered equal when their type, length, and all data are the same.
- Parameters:
obj- the object to compare this attribute with.
-
getName
String getName()
Returns the human readable name of this attribute. Attribute names do not really matter from the protocol point of view. They are only used for debugging and readability.
-
getDataLength
char getDataLength()
Returns the length of this attribute's body.
-
setRequestedTransport
void setRequestedTransport(byte transportProtocol)
Set the transport protocol.
- Parameters:
transportProtocol- transport protocol
-
getRequestedTransport
int getRequestedTransport()
Get the transport protocol.
-
-
-
-