Package 

Class XorOnlyAttribute

  • All Implemented Interfaces:

    
    public class XorOnlyAttribute
    extends Attribute
                        

    This attribute is present in a Binding Request. It is used by a client to request that a server compliant to this specification omit the MAPPED-ADDRESS from a Binding Response, and include only the XOR- MAPPED-ADDRESS. This is necessary in cases where a Binding Response is failing integrity checks because a NAT is rewriting the contents of a MAPPED-ADDRESS in the Binding Response. This attribute has a length of zero, and therefore contains no other information past the common attribute header.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<byte> encode() Returns a binary representation of this attribute.
      char getDataLength() Returns the length of this attribute's body.
      String getName() Returns the human readable name of this attribute.
      boolean equals(Object obj) Compares two STUN Attributes.
      • 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

      • encode

         Array<byte> encode()

        Returns a binary representation of this attribute.

      • getDataLength

         char getDataLength()

        Returns the length of this attribute's body. (Which in the case of the XOR-ONLY attribute is 0);

      • getName

         String getName()

        Returns the human readable name 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.