Home | History | Annotate | Download | only in DNS
      1 // Copyright (c) 1999-2004 Brian Wellington (bwelling (at) xbill.org)
      2 
      3 package org.xbill.DNS;
      4 
      5 /**
      6  * Key Exchange - delegation of authority
      7  *
      8  * @author Brian Wellington
      9  */
     10 
     11 public class KXRecord extends U16NameBase {
     12 
     13 private static final long serialVersionUID = 7448568832769757809L;
     14 
     15 KXRecord() {}
     16 
     17 Record
     18 getObject() {
     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  */
     28 public
     29 KXRecord(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 */
     35 public Name
     36 getTarget() {
     37 	return getNameField();
     38 }
     39 
     40 /** Returns the preference of this KX record */
     41 public int
     42 getPreference() {
     43 	return getU16Field();
     44 }
     45 
     46 public Name
     47 getAdditionalName() {
     48 	return getNameField();
     49 }
     50 
     51 }
     52