public abstract class DnsEntry
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
owner
the owner name
|
private static java.util.regex.Pattern |
parsePattern
the pattern to match the entry
|
Constructor and Description |
---|
DnsEntry() |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(DnsEntryVisitor visitor)
accept the given visitor
|
static java.util.List<DnsEntry> |
allFromList(KVList list,
java.lang.String encodedDomainName)
create instances from the given key-value list
|
DnsEntry |
clone()
create a clone of this instance.
|
private static DnsEntry |
createNSEntry(java.lang.String value)
create a name server entry
|
static DnsEntry |
fromXml(org.w3c.dom.Element el)
create an instance from the given XML element
|
java.lang.String |
getOwner()
return the owner
|
protected static boolean |
isIPv6(java.lang.String addr)
test whether the given address is an IPv6 address
|
protected void |
setOwner(java.lang.String theOwner)
set the owner
|
abstract void |
toList(KVList list)
convert the instance to an entry in the given list
|
abstract void |
toXml(org.w3c.dom.Node node,
java.lang.String encodedDomainName)
convert the instance to XML
|
private java.lang.String owner
private static final java.util.regex.Pattern parsePattern
private static DnsEntry createNSEntry(java.lang.String value) throws ResponseParseException
value
- the valueResponseParseException
- if the data was not recognizedpublic static java.util.List<DnsEntry> allFromList(KVList list, java.lang.String encodedDomainName) throws ResponseParseException
list
- the listencodedDomainName
- the encoded domain name from the domain
info dataResponseParseException
- if the data was not recognizedpublic static DnsEntry fromXml(org.w3c.dom.Element el) throws org.w3c.dom.DOMException, ResponseParseException
el
- the elementorg.w3c.dom.DOMException
- on DOM exceptionsResponseParseException
- if the data was not recognizedpublic abstract void toList(KVList list) throws EncodeException
list
- the listEncodeException
- if the encoding failspublic abstract void toXml(org.w3c.dom.Node node, java.lang.String encodedDomainName) throws org.w3c.dom.DOMException, EncodeException
node
- the node to append toencodedDomainName
- the encoded domain name from the domain
info dataorg.w3c.dom.DOMException
- on DOM exceptionsEncodeException
- if the encoding failspublic abstract void accept(DnsEntryVisitor visitor)
visitor
- the visitorpublic DnsEntry clone()
clone
in class java.lang.Object
protected static boolean isIPv6(java.lang.String addr)
addr
- the addresstrue
if it is likely an IPv6 addresspublic java.lang.String getOwner()
protected void setOwner(java.lang.String theOwner)
theOwner
- the ownerCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH