- All Implemented Interfaces:
Serializable, Comparable<DnsMessage.RESPONSE_CODE>, java.lang.constant.Constable
- Enclosing class:
DnsMessage
Possible DNS response codes.
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBad algorithmBad cookieBad keyBad modeBad nameBad timestampBad truncationBad version or bad signatureFormat errorNo errorNot implementedServer not authoritativeName not in zoneNon-existent domainRR set does not existQuery refusedServer failureName exists when it should notRR set exists when it should notField Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Integer, DnsMessage.RESPONSE_CODE> Reverse lookup table for response codes.private final byteThe response code value.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic DnsMessage.RESPONSE_CODEgetResponseCode(int value) Retrieve the response code for a byte value.bytegetValue()Retrieve the byte value of the response code.static DnsMessage.RESPONSE_CODEReturns the enum constant of this class with the specified name.static DnsMessage.RESPONSE_CODE[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
NO_ERROR
No errorFORMAT_ERR
Format errorSERVER_FAIL
Server failureNX_DOMAIN
Non-existent domainNO_IMP
Not implementedREFUSED
Query refusedYXDOMAIN
Name exists when it should notYXRRSET
RR set exists when it should notNXRRSET
RR set does not existNOT_AUTH
Server not authoritativeNOT_ZONE
Name not in zoneBADVERS_BADSIG
Bad version or bad signatureBADKEY
Bad keyBADTIME
Bad timestampBADMODE
Bad modeBADNAME
Bad nameBADALG
Bad algorithmBADTRUNC
Bad truncationBADCOOKIE
Bad cookie
Field Details
INVERSE_LUT
Reverse lookup table for response codes.value
private final byte valueThe response code value.
Constructor Details
RESPONSE_CODE
private RESPONSE_CODE(int value) Create a new response code.- Parameters:
value- The response code value.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
getValue
public byte getValue()Retrieve the byte value of the response code.- Returns:
- the response code.
getResponseCode
Retrieve the response code for a byte value.- Parameters:
value- The byte value.- Returns:
- The symbolic response code or null.
- Throws:
IllegalArgumentException- if the value is not in the range of 0..15.