All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.couchbase.client.core.deps.org.xbill.DNS.KXRecord Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 1999-2004 Brian Wellington ([email protected])

package com.couchbase.client.core.deps.org.xbill.DNS;

/**
 * Key Exchange - delegation of authority
 *
 * @author Brian Wellington
 * @see RFC 2230: Key Exchange Delegation Record for
 *     the DNS
 */
public class KXRecord extends U16NameBase {
  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();
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy