01: // Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
02:
03: package org.xbill.DNS;
04:
05: /**
06: * DNAME Record - maps a nonterminal alias (subtree) to a different domain
07: *
08: * @author Brian Wellington
09: */
10:
11: public class DNAMERecord extends SingleNameBase {
12:
13: DNAMERecord() {
14: }
15:
16: Record getObject() {
17: return new DNAMERecord();
18: }
19:
20: /**
21: * Creates a new DNAMERecord with the given data
22: * @param alias The name to which the DNAME alias points
23: */
24: public DNAMERecord(Name name, int dclass, long ttl, Name alias) {
25: super (name, Type.DNAME, dclass, ttl, alias, "alias");
26: }
27:
28: /**
29: * Gets the target of the DNAME Record
30: */
31: public Name getTarget() {
32: return getSingleName();
33: }
34:
35: /** Gets the alias specified by the DNAME Record */
36: public Name getAlias() {
37: return getSingleName();
38: }
39:
40: }
|