Package 

Class ChannelNumberAttribute

  • All Implemented Interfaces:

    
    public class ChannelNumberAttribute
    extends Attribute
                        

    The CHANNEL-NUMBER attribute is used to known on which channel the TURN client want to send data.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      char getChannelNumber() Get the channel number.
      void setChannelNumber(char channelNumber) Set the channel number.
      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.
      static boolean isValidRange(char channelNo) Determines if the channelNo is in valid range.
      • 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

      • setChannelNumber

         void setChannelNumber(char channelNumber)

        Set the channel number.

        Parameters:
        channelNumber - channel number
      • 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.

      • isValidRange

         static boolean isValidRange(char channelNo)

        Determines if the channelNo is in valid range.

        Parameters:
        channelNo - the channelNo to validate.