1// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
2
3package org.xbill.DNS;
4
5/**
6 * Key Exchange - delegation of authority
7 *
8 * @author Brian Wellington
9 */
10
11public class KXRecord extends U16NameBase {
12
13private static final long serialVersionUID = 7448568832769757809L;
14
15KXRecord() {}
16
17Record
18getObject() {
19	return new KXRecord();
20}
21
22/**
23 * Creates a KX Record from the given data
24 * @param preference The preference of this KX.  Records with lower priority
25 * are preferred.
26 * @param target The host that authority is delegated to
27 */
28public
29KXRecord(Name name, int dclass, long ttl, int preference, Name target) {
30	super(name, Type.KX, dclass, ttl, preference, "preference",
31	      target, "target");
32}
33
34/** Returns the target of the KX record */
35public Name
36getTarget() {
37	return getNameField();
38}
39
40/** Returns the preference of this KX record */
41public int
42getPreference() {
43	return getU16Field();
44}
45
46public Name
47getAdditionalName() {
48	return getNameField();
49}
50
51}
52