Debian Codegraph @

minidns-client/src/main/java/org/minidns/dnsqueryresult/CachedDnsQueryResult.java

raw
1 /*
2 * Copyright 2015-2020 the original author or authors
3 *
4 * This software is licensed under the Apache License, Version 2.0,
5 * the GNU Lesser General Public License version 2 or later ("LGPL")
6 * and the WTFPL.
7 * You may choose either license to govern your use of this software only
8 * upon the condition that you accept all of the terms of either
9 * the Apache License 2.0, the LGPL 2.1+ or the WTFPL.
10 */
11 package org.minidns.dnsqueryresult;
12
13 import org.minidns.dnsmessage.DnsMessage;
14
15 public abstract class CachedDnsQueryResult extends DnsQueryResult {
16
17 protected final DnsQueryResult cachedDnsQueryResult;
18
19 protected CachedDnsQueryResult(DnsMessage query, DnsQueryResult cachedDnsQueryResult) {
20 super(QueryMethod.cachedDirect, query, cachedDnsQueryResult.response);
21 this.cachedDnsQueryResult = cachedDnsQueryResult;
22 }
23
24 protected CachedDnsQueryResult(DnsMessage query, DnsMessage response, DnsQueryResult synthesynthesizationSource) {
25 super(QueryMethod.cachedSynthesized, query, response);
26 this.cachedDnsQueryResult = synthesynthesizationSource;
27 }
28 }