aboutsummaryrefslogtreecommitdiff
path: root/src/org/xbill/DNS/KXRecord.java
blob: 481d21b8cbc372c39e942b34629b7b6ffb3d2c08 (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
46
47
48
49
50
51
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

/**
 * Key Exchange - delegation of authority
 *
 * @author Brian Wellington
 */

public class KXRecord extends U16NameBase {

private static final long serialVersionUID = 7448568832769757809L;

KXRecord() {}

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

/**
 * Creates a KX Record from the given data
 * @param preference The preference of this KX.  Records with lower priority
 * are preferred.
 * @param target The host that authority is delegated to
 */
public
KXRecord(Name name, int dclass, long ttl, int preference, Name target) {
	super(name, Type.KX, dclass, ttl, preference, "preference",
	      target, "target");
}

/** Returns the target of the KX record */
public Name
getTarget() {
	return getNameField();
}

/** Returns the preference of this KX record */
public int
getPreference() {
	return getU16Field();
}

public Name
getAdditionalName() {
	return getNameField();
}

}