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

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

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

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

/**
 * Route Through Record - lists a route preference and intermediate host.
 *
 * @author Brian Wellington
 * @see RFC 1035: Domain Names - Implementation and
 *     Specification
 */
public class RTRecord extends U16NameBase {
  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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy