Package org.xbill.DNS

Class Update

All Implemented Interfaces:
Cloneable

public class Update extends Message
A helper class for constructing dynamic DNS (DDNS) update messages.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final Name
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Update(Name zone)
    Creates an update message.
    Update(Name zone, int dclass)
    Creates an update message.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    absent(Name name)
    Inserts a prerequisite that the specified name does not exist; that is, there are no records with the given name in the zone.
    void
    absent(Name name, int type)
    Inserts a prerequisite that the specified rrset does not exist; that is, there are no records with the given name and type in the zone.
    void
    add(Name name, int type, long ttl, String recordToAdd)
    Parses a record from the string, and indicates that the record should be inserted into the zone.
    void
    add(Name name, int type, long ttl, Tokenizer tokenizer)
    Parses a record from the tokenizer, and indicates that the record should be inserted into the zone.
    void
    add(Record recordToAdd)
    Indicates that the record should be inserted into the zone.
    void
    add(Record[] records)
    Indicates that the records should be inserted into the zone.
    <T extends Record>
    void
    add(RRset rrset)
    Indicates that all the records in the rrset should be inserted into the zone.
    void
    delete(Name name)
    Indicates that all records with the given name should be deleted from the zone.
    void
    delete(Name name, int type)
    Indicates that all records with the given name and type should be deleted from the zone.
    void
    delete(Name name, int type, String recordToDelete)
    Parses a record from the string, and indicates that the record should be deleted from the zone.
    void
    delete(Name name, int type, Tokenizer tokenizer)
    Parses a record from the tokenizer, and indicates that the record should be deleted from the zone.
    void
    delete(Record recordToDelete)
    Indicates that the specified record should be deleted from the zone.
    void
    delete(Record[] records)
    Indicates that the records should be deleted from the zone.
    <T extends Record>
    void
    delete(RRset rrset)
    Indicates that all of the records in the rrset should be deleted from the zone.
    private void
     
    private void
     
    void
    present(Name name)
    Inserts a prerequisite that the specified name exists; that is, there exist records with the given name in the zone.
    void
    present(Name name, int type)
    Inserts a prerequisite that the specified rrset exists; that is, there exist records with the given name and type in the zone.
    void
    present(Name name, int type, String recordToCheck)
    Parses a record from the string, and inserts a prerequisite that the record exists.
    void
    present(Name name, int type, Tokenizer tokenizer)
    Parses a record from the tokenizer, and inserts a prerequisite that the record exists.
    void
    present(Record recordToCheck)
    Inserts a prerequisite that the specified record exists.
    void
    replace(Name name, int type, long ttl, String recordToReplace)
    Parses a record from the string, and indicates that the record should be inserted into the zone replacing any other records with the same name and type.
    void
    replace(Name name, int type, long ttl, Tokenizer tokenizer)
    Parses a record from the tokenizer, and indicates that the record should be inserted into the zone replacing any other records with the same name and type.
    void
    replace(Record recordToReplace)
    Indicates that the record should be inserted into the zone replacing any other records with the same name and type.
    void
    replace(Record[] records)
    Indicates that the records should be inserted into the zone replacing any other records with the same name and type as each one.
    <T extends Record>
    void
    replace(RRset rrset)
    Indicates that all the records in the rrset should be inserted into the zone replacing any other records with the same name and type.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • origin

      private final Name origin
    • dclass

      private final int dclass
  • Constructor Details

    • Update

      public Update(Name zone, int dclass)
      Creates an update message.
      Parameters:
      zone - The name of the zone being updated.
      dclass - The class of the zone being updated.
    • Update

      public Update(Name zone)
      Creates an update message. The class is assumed to be IN.
      Parameters:
      zone - The name of the zone being updated.
  • Method Details

    • newPrereq

      private void newPrereq(Record rec)
    • newUpdate

      private void newUpdate(Record rec)
    • present

      public void present(Name name)
      Inserts a prerequisite that the specified name exists; that is, there exist records with the given name in the zone.
    • present

      public void present(Name name, int type)
      Inserts a prerequisite that the specified rrset exists; that is, there exist records with the given name and type in the zone.
    • present

      public void present(Name name, int type, String recordToCheck) throws IOException
      Parses a record from the string, and inserts a prerequisite that the record exists. Due to the way value-dependent prequisites work, the condition that must be met is that the set of all records with the same and type in the update message must be identical to the set of all records with that name and type on the server.
      Throws:
      IOException - The record could not be parsed.
    • present

      public void present(Name name, int type, Tokenizer tokenizer) throws IOException
      Parses a record from the tokenizer, and inserts a prerequisite that the record exists. Due to the way value-dependent prequisites work, the condition that must be met is that the set of all records with the same and type in the update message must be identical to the set of all records with that name and type on the server.
      Throws:
      IOException - The record could not be parsed.
    • present

      public void present(Record recordToCheck)
      Inserts a prerequisite that the specified record exists. Due to the way value-dependent prequisites work, the condition that must be met is that the set of all records with the same and type in the update message must be identical to the set of all records with that name and type on the server.
    • absent

      public void absent(Name name)
      Inserts a prerequisite that the specified name does not exist; that is, there are no records with the given name in the zone.
    • absent

      public void absent(Name name, int type)
      Inserts a prerequisite that the specified rrset does not exist; that is, there are no records with the given name and type in the zone.
    • add

      public void add(Name name, int type, long ttl, String recordToAdd) throws IOException
      Parses a record from the string, and indicates that the record should be inserted into the zone.
      Throws:
      IOException - The record could not be parsed.
    • add

      public void add(Name name, int type, long ttl, Tokenizer tokenizer) throws IOException
      Parses a record from the tokenizer, and indicates that the record should be inserted into the zone.
      Throws:
      IOException - The record could not be parsed.
    • add

      public void add(Record recordToAdd)
      Indicates that the record should be inserted into the zone.
    • add

      public void add(Record[] records)
      Indicates that the records should be inserted into the zone.
    • add

      public <T extends Record> void add(RRset rrset)
      Indicates that all the records in the rrset should be inserted into the zone.
    • delete

      public void delete(Name name)
      Indicates that all records with the given name should be deleted from the zone.
    • delete

      public void delete(Name name, int type)
      Indicates that all records with the given name and type should be deleted from the zone.
    • delete

      public void delete(Name name, int type, String recordToDelete) throws IOException
      Parses a record from the string, and indicates that the record should be deleted from the zone.
      Throws:
      IOException - The record could not be parsed.
    • delete

      public void delete(Name name, int type, Tokenizer tokenizer) throws IOException
      Parses a record from the tokenizer, and indicates that the record should be deleted from the zone.
      Throws:
      IOException - The record could not be parsed.
    • delete

      public void delete(Record recordToDelete)
      Indicates that the specified record should be deleted from the zone.
    • delete

      public void delete(Record[] records)
      Indicates that the records should be deleted from the zone.
    • delete

      public <T extends Record> void delete(RRset rrset)
      Indicates that all of the records in the rrset should be deleted from the zone.
    • replace

      public void replace(Name name, int type, long ttl, String recordToReplace) throws IOException
      Parses a record from the string, and indicates that the record should be inserted into the zone replacing any other records with the same name and type.
      Throws:
      IOException - The record could not be parsed.
    • replace

      public void replace(Name name, int type, long ttl, Tokenizer tokenizer) throws IOException
      Parses a record from the tokenizer, and indicates that the record should be inserted into the zone replacing any other records with the same name and type.
      Throws:
      IOException - The record could not be parsed.
    • replace

      public void replace(Record recordToReplace)
      Indicates that the record should be inserted into the zone replacing any other records with the same name and type.
    • replace

      public void replace(Record[] records)
      Indicates that the records should be inserted into the zone replacing any other records with the same name and type as each one.
    • replace

      public <T extends Record> void replace(RRset rrset)
      Indicates that all the records in the rrset should be inserted into the zone replacing any other records with the same name and type.