Package 

Class PriorityAttribute

  • All Implemented Interfaces:

    
    public class PriorityAttribute
    extends Attribute
                        

    This class is used to represent the PRIORITY attribute used for ICE processing This attribute is not in the original specification of STUN It is added as an extension to STUN to be used for ICE implementations PRIORITY attribute contains a 32 bit priority value It is used in stun binding requests sent from ICE-Agents to their peers

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long priority
    • Constructor Summary

      Constructors 
      Constructor Description
      PriorityAttribute() Creates a priority attribute.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      long getPriority() Returns the priority specified in the PRIORITY Attribute
      void setPriority(long priority) Sets the priority of the PRIORITY Attribute with the specified value
      Array<byte> encode() Returns a binary representation of this attribute.
      boolean equals(Object obj) Compares two STUN Attributes.
      char getDataLength() Returns the length of this attribute's body.
      String getName() Returns the human readable name of this attribute.
      • 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

      • PriorityAttribute

        PriorityAttribute()
        Creates a priority attribute.
    • Method Detail

      • getPriority

         long getPriority()

        Returns the priority specified in the PRIORITY Attribute

      • setPriority

         void setPriority(long priority)

        Sets the priority of the PRIORITY Attribute with the specified value

        Parameters:
        priority - the long variable specifying the priority value
      • encode

         Array<byte> encode()

        Returns a binary representation of this attribute.

      • equals

         boolean equals(Object obj)

        Compares two STUN Attributes. Two attributes are considered equal when they have the same type length and value.

        Parameters:
        obj - the object to compare this attribute with.
      • getDataLength

         char getDataLength()

        Returns the length of this attribute's body.

      • getName

         String getName()

        Returns the human readable name of this attribute.