Class DnsResponseCode

  • All Implemented Interfaces:
    java.lang.Comparable<DnsResponseCode>

    public class DnsResponseCode
    extends java.lang.Object
    implements java.lang.Comparable<DnsResponseCode>
    The DNS RCODE, as defined in RFC2929.
    • Constructor Detail

      • DnsResponseCode

        public DnsResponseCode​(int code,
                               java.lang.String name)
    • Method Detail

      • valueOf

        public static DnsResponseCode valueOf​(int responseCode)
        Returns the DnsResponseCode that corresponds with the given responseCode.
        Parameters:
        responseCode - the DNS RCODE
        Returns:
        the corresponding DnsResponseCode
      • intValue

        public int intValue()
        Returns the error code for this DnsResponseCode.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Equality of DnsResponseCode only depends on intValue().
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Returns a formatted error message for this DnsResponseCode.
        Overrides:
        toString in class java.lang.Object