de.knipp.rritoolkit.dns
Class DnsEntryMX

java.lang.Object
  extended by de.knipp.rritoolkit.dns.DnsEntry
      extended by de.knipp.rritoolkit.dns.DnsEntryMX
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DnsEntryMX
extends DnsEntry

the record describes an "MX" record in the domain.

Version:
$Revision: 14936 $
Author:
Klaus Malorny
See Also:
Serialized Form

Field Summary
private  java.lang.String mailExchangeName
          the domain name of the mail exchange server
private static java.util.regex.Pattern parsePattern
          the pattern to parse the contents of the value
private  int preference
          the priority
 
Constructor Summary
protected DnsEntryMX(org.w3c.dom.Element el)
          constructor
  DnsEntryMX(java.lang.String theOwner, int thePreference, java.lang.String exchangeName)
          constructor
protected DnsEntryMX(java.lang.String owner, java.lang.String value)
          constructor
 
Method Summary
 void accept(DnsEntryVisitor visitor)
          accept the given visitor
 DnsEntryMX clone()
          create a clone of this instance.
 java.lang.String getMailExchangeName()
          return the exchange server name
 int getPreference()
          return the priority
 void toList(KVList list)
          convert the instance to an entry in the given list
 java.lang.String toString()
          create a string representation (for debugging purposes)
 void toXml(org.w3c.dom.Node node, java.lang.String encodedDomainName)
          convert the instance to XML
 
Methods inherited from class de.knipp.rritoolkit.dns.DnsEntry
allFromList, fromXml, getOwner, isIPv6, setOwner
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

preference

private int preference
the priority


mailExchangeName

private java.lang.String mailExchangeName
the domain name of the mail exchange server


parsePattern

private static final java.util.regex.Pattern parsePattern
the pattern to parse the contents of the value

Constructor Detail

DnsEntryMX

public DnsEntryMX(java.lang.String theOwner,
                  int thePreference,
                  java.lang.String exchangeName)
constructor

Parameters:
theOwner - the owner
thePreference - the preference
exchangeName - the name of the mail exchange

DnsEntryMX

protected DnsEntryMX(java.lang.String owner,
                     java.lang.String value)
              throws ResponseParseException
constructor

Parameters:
owner - the owner
value - the rdata part of the entry
Throws:
ResponseParseException - on parsing problems

DnsEntryMX

protected DnsEntryMX(org.w3c.dom.Element el)
              throws org.w3c.dom.DOMException,
                     ResponseParseException
constructor

Parameters:
el - the element
Throws:
org.w3c.dom.DOMException - on DOM exceptions
ResponseParseException - on wrong content
Method Detail

toList

public void toList(KVList list)
            throws EncodeException
convert the instance to an entry in the given list

Specified by:
toList in class DnsEntry
Parameters:
list - the list
Throws:
EncodeException - if the encoding fails

toXml

public void toXml(org.w3c.dom.Node node,
                  java.lang.String encodedDomainName)
           throws org.w3c.dom.DOMException,
                  EncodeException
convert the instance to XML

Specified by:
toXml in class DnsEntry
Parameters:
node - the node to append to
encodedDomainName - the encoded domain name from the domain info data
Throws:
org.w3c.dom.DOMException - on DOM exceptions
EncodeException - if the encoding fails

accept

public void accept(DnsEntryVisitor visitor)
accept the given visitor

Specified by:
accept in class DnsEntry
Parameters:
visitor - the visitor

clone

public DnsEntryMX clone()
create a clone of this instance.

Overrides:
clone in class DnsEntry
Returns:
the clone

toString

public java.lang.String toString()
create a string representation (for debugging purposes)

Overrides:
toString in class java.lang.Object
Returns:
the string representation

getPreference

public int getPreference()
return the priority

Returns:
the priority

getMailExchangeName

public java.lang.String getMailExchangeName()
return the exchange server name

Returns:
the name of the exchange server


Copyright © 2005-2011 Knipp Medien und Kommunikation GmbH