001/*
002 * Copyright 2015-2020 the original author or authors
003 *
004 * This software is licensed under the Apache License, Version 2.0,
005 * the GNU Lesser General Public License version 2 or later ("LGPL")
006 * and the WTFPL.
007 * You may choose either license to govern your use of this software only
008 * upon the condition that you accept all of the terms of either
009 * the Apache License 2.0, the LGPL 2.1+ or the WTFPL.
010 */
011package org.minidns.dnsqueryresult;
012
013import org.minidns.dnsmessage.DnsMessage;
014
015public abstract class CachedDnsQueryResult extends DnsQueryResult {
016
017    protected final DnsQueryResult cachedDnsQueryResult;
018
019    protected CachedDnsQueryResult(DnsMessage query, DnsQueryResult cachedDnsQueryResult) {
020        super(QueryMethod.cachedDirect, query, cachedDnsQueryResult.response);
021        this.cachedDnsQueryResult = cachedDnsQueryResult;
022    }
023
024    protected CachedDnsQueryResult(DnsMessage query, DnsMessage response, DnsQueryResult synthesynthesizationSource) {
025        super(QueryMethod.cachedSynthesized, query, response);
026        this.cachedDnsQueryResult = synthesynthesizationSource;
027    }
028}