01: // Copyright (c) 2004 Brian Wellington (bwelling@xbill.org)
02:
03: package org.xbill.DNS;
04:
05: /**
06: * AFS Data Base Record - maps a domain name to the name of an AFS cell
07: * database server.
08: *
09: *
10: * @author Brian Wellington
11: */
12:
13: public class AFSDBRecord extends U16NameBase {
14:
15: AFSDBRecord() {
16: }
17:
18: Record getObject() {
19: return new AFSDBRecord();
20: }
21:
22: /**
23: * Creates an AFSDB Record from the given data.
24: * @param subtype Indicates the type of service provided by the host.
25: * @param host The host providing the service.
26: */
27: public AFSDBRecord(Name name, int dclass, long ttl, int subtype,
28: Name host) {
29: super (name, Type.AFSDB, dclass, ttl, subtype, "subtype", host,
30: "host");
31: }
32:
33: /** Gets the subtype indicating the service provided by the host. */
34: public int getSubtype() {
35: return getU16Field();
36: }
37:
38: /** Gets the host providing service for the domain. */
39: public Name getHost() {
40: return getNameField();
41: }
42:
43: }
|