Package 

Class RequestedTransportAttribute

  • 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String NAME
      public final static char DATA_LENGTH
      public final static byte UDP
      public final static byte TCP
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean equals(Object obj) Compares two STUN Attributes.
      String getName() Returns the human readable name of this attribute.
      char getDataLength() Returns the length of this attribute's body.
      Array<byte> encode() Returns a binary representation of this attribute.
      void setRequestedTransport(byte transportProtocol) Set the transport protocol.
      int getRequestedTransport() Get the transport protocol.
      • Methods inherited from class org.ice4j.attribute.Attribute

        getAttributeType, getLocationInMessage, setLocationInMessage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.

      • encode

         Array<byte> encode()

        Returns a binary representation of this attribute.

      • setRequestedTransport

         void setRequestedTransport(byte transportProtocol)

        Set the transport protocol.

        Parameters:
        transportProtocol - transport protocol