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

com.couchbase.client.core.deps.org.xbill.DNS.CNAMERecord 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;

/**
 * CNAME Record - maps an alias to its real name
 *
 * @author Brian Wellington
 * @see RFC 1035: Domain Names - Implementation and
 *     Specification
 */
public class CNAMERecord extends SingleCompressedNameBase {
  CNAMERecord() {}

  /**
   * Creates a new CNAMERecord with the given data
   *
   * @param alias The name to which the CNAME alias points
   */
  public CNAMERecord(Name name, int dclass, long ttl, Name alias) {
    super(name, Type.CNAME, dclass, ttl, alias, "alias");
  }

  /** Gets the target of the CNAME Record */
  public Name getTarget() {
    return getSingleName();
  }

  /**
   * Gets the name of this record, aka the alias or label to the canonical name
   * specified in {@link #getTarget()}.
   *
   * @deprecated use {@link #getName()}
   */
  @Deprecated
  public Name getAlias() {
    return getName();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy