aboutsummaryrefslogtreecommitdiff
path: root/src/org/xbill/DNS/CNAMERecord.java
blob: 8db9453e7cf0ebfc7858bc0b82d35faf01f8853f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

/**
 * CNAME Record  - maps an alias to its real name
 *
 * @author Brian Wellington
 */

public class CNAMERecord extends SingleCompressedNameBase {

private static final long serialVersionUID = -4020373886892538580L;

CNAMERecord() {}

Record
getObject() {
	return new CNAMERecord();
}

/**
 * Creates a new CNAMERecord with the given data
 * @param alias The name to which the CNAME alias points
 */
public
CNAMERecord(Name name, int dclass, long ttl, Name alias) {
	super(name, Type.CNAME, dclass, ttl, alias, "alias");
}

/**
 * Gets the target of the CNAME Record
 */
public Name
getTarget() {
	return getSingleName();
}

/** Gets the alias specified by the CNAME Record */
public Name
getAlias() {
	return getSingleName();
}

}