aboutsummaryrefslogtreecommitdiff
path: root/src/org/xbill/DNS/RTRecord.java
blob: 549731ec72a0a0b9ce70381a8de98bc6ab03243b (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
// Copyright (c) 2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

/**
 * Route Through Record - lists a route preference and intermediate host.
 *
 * @author Brian Wellington
 */

public class RTRecord extends U16NameBase {

private static final long serialVersionUID = -3206215651648278098L;

RTRecord() {}

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

/**
 * Creates an RT Record from the given data
 * @param preference The preference of the route.  Smaller numbers indicate
 * more preferred routes.
 * @param intermediateHost The domain name of the host to use as a router.
 */
public
RTRecord(Name name, int dclass, long ttl, int preference,
	 Name intermediateHost)
{
	super(name, Type.RT, dclass, ttl, preference, "preference",
	      intermediateHost, "intermediateHost");
}

/** Gets the preference of the route. */
public int
getPreference() {
	return getU16Field();
}

/** Gets the host to use as a router. */
public Name
getIntermediateHost() {
	return getNameField();
}

}