|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xbill.DNS.Zone
public class Zone
A DNS Zone. This encapsulates all data related to a Zone, and provides convenient lookup methods.
Field Summary | |
---|---|
static int |
PRIMARY
A primary zone |
static int |
SECONDARY
A secondary zone |
Constructor Summary | |
---|---|
Zone(Name zone,
int dclass,
String remote)
Creates a Zone by performing a zone transfer to the specified host. |
|
Zone(Name zone,
Record[] records)
Creates a Zone from an array of records. |
|
Zone(Name zone,
String file)
Creates a Zone from the records in the specified master file. |
|
Zone(ZoneTransferIn xfrin)
Creates a Zone by doing the specified zone transfer. |
Method Summary | |
---|---|
void |
addRecord(Record r)
Adds a Record to the Zone |
void |
addRRset(RRset rrset)
Adds an RRset to the Zone |
Iterator |
AXFR()
Returns an Iterator over the RRsets in the zone that can be used to construct an AXFR response. |
RRset |
findExactMatch(Name name,
int type)
Looks up Records in the zone, finding exact matches only. |
SetResponse |
findRecords(Name name,
int type)
Looks up Records in the Zone. |
int |
getDClass()
Returns the Zone's class |
RRset |
getNS()
Returns the Zone origin's NS records |
Name |
getOrigin()
Returns the Zone's origin |
SOARecord |
getSOA()
Returns the Zone's SOA record |
Iterator |
iterator()
Returns an Iterator over the RRsets in the zone. |
void |
removeRecord(Record r)
Removes a record from the Zone |
String |
toMasterFile()
Returns the contents of the Zone in master file format. |
String |
toString()
Returns the contents of the Zone as a string (in master file format). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PRIMARY
public static final int SECONDARY
Constructor Detail |
---|
public Zone(Name zone, String file) throws IOException
zone
- The name of the zone.file
- The master file to read from.
IOException
Master
public Zone(Name zone, Record[] records) throws IOException
zone
- The name of the zone.records
- The records to add to the zone.
IOException
Master
public Zone(ZoneTransferIn xfrin) throws IOException, ZoneTransferException
xfrin
- The incoming zone transfer to execute.
IOException
ZoneTransferException
ZoneTransferIn
public Zone(Name zone, int dclass, String remote) throws IOException, ZoneTransferException
IOException
ZoneTransferException
ZoneTransferIn
Method Detail |
---|
public Name getOrigin()
public RRset getNS()
public SOARecord getSOA()
public int getDClass()
public SetResponse findRecords(Name name, int type)
name
- The name to look uptype
- The type to look up
SetResponse
public RRset findExactMatch(Name name, int type)
name
- The name to look uptype
- The type to look up
RRset
public void addRRset(RRset rrset)
rrset
- The RRset to be addedRRset
public void addRecord(Record r)
r
- The record to be addedRecord
public void removeRecord(Record r)
r
- The record to be removedRecord
public Iterator iterator()
public Iterator AXFR()
iterator()
except
that the SOA is returned at the end as well as the beginning.
public String toMasterFile()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |