1// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
2
3package org.xbill.DNS;
4
5/**
6 * DNAME Record  - maps a nonterminal alias (subtree) to a different domain
7 *
8 * @author Brian Wellington
9 */
10
11public class DNAMERecord extends SingleNameBase {
12
13private static final long serialVersionUID = 2670767677200844154L;
14
15DNAMERecord() {}
16
17Record
18getObject() {
19	return new DNAMERecord();
20}
21
22/**
23 * Creates a new DNAMERecord with the given data
24 * @param alias The name to which the DNAME alias points
25 */
26public
27DNAMERecord(Name name, int dclass, long ttl, Name alias) {
28	super(name, Type.DNAME, dclass, ttl, alias, "alias");
29}
30
31/**
32 * Gets the target of the DNAME Record
33 */
34public Name
35getTarget() {
36	return getSingleName();
37}
38
39/** Gets the alias specified by the DNAME Record */
40public Name
41getAlias() {
42	return getSingleName();
43}
44
45}
46