Class LookupResult

java.lang.Object
org.xbill.DNS.lookup.LookupResult

public final class LookupResult extends Object
LookupResult instances holds the result of a successful lookup operation.
Since:
3.4
  • Field Details

    • records

      private final List<Record> records
      An unmodifiable list of records that this instance wraps, may not be null but can be empty
    • aliases

      private final List<Name> aliases
      In the case of CNAME or DNAME indirection, this property contains the original name as well as any intermediate redirect targets except the last one. For example, if X is a CNAME pointing to Y which is a CNAME pointing to Z which has an A record, aliases will hold X and Y after successful lookup.
    • queryResponsePairs

      private final Map<Record,Message> queryResponsePairs
      The queries and responses that made up the result.
    • isAuthenticated

      private final boolean isAuthenticated
      Gets an indication if the message(s) that provided this result were authenticated, e.g. by using ValidatingResolver or when the upstream resolver has set the Flags.AD flag.

      IMPORTANT: Note that in the latter case, the flag cannot be trusted unless the Resolver used by the LookupSession that created this result:

      • has TSIG enabled
      • uses an externally secured transport, e.g. with IPSec or DNS over TLS.
  • Constructor Details

    • LookupResult

      @Deprecated public LookupResult(List<Record> records, List<Name> aliases)
      Deprecated.
      This class is not intended for public instantiation.
      Construct an instance with the provided records and, in the case of a CNAME or DNAME indirection a List of aliases.
      Parameters:
      records - a list of records to return.
      aliases - a list of aliases discovered during lookup, or null if there was no indirection.
    • LookupResult

      LookupResult(boolean isAuthenticated)
    • LookupResult

      LookupResult(Record query, boolean isAuthenticated, Record result)
    • LookupResult

      LookupResult(LookupResult previous, Record query, Message answer, boolean isAuthenticated, List<Record> records, List<Name> aliases)