|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xbill.DNS.Generator
public class Generator
A representation of a $GENERATE statement in a master file.
Field Summary | |
---|---|
int |
dclass
The class of the generated records. |
long |
end
The end of the range. |
String |
namePattern
The pattern to use for generating record names. |
Name |
origin
The origin to append to relative names. |
String |
rdataPattern
The pattern to use for generating record data. |
long |
start
The start of the range. |
long |
step
The step value of the range. |
long |
ttl
The ttl of the generated records. |
int |
type
The type of the generated records. |
Constructor Summary | |
---|---|
Generator(long start,
long end,
long step,
String namePattern,
int type,
int dclass,
long ttl,
String rdataPattern,
Name origin)
Creates a specification for generating records, as a $GENERATE statement in a master file. |
Method Summary | |
---|---|
Record[] |
expand()
Constructs and returns all records in the expansion. |
Record |
nextRecord()
Constructs and returns the next record in the expansion. |
static boolean |
supportedType(int type)
Indicates whether generation is supported for this type. |
String |
toString()
Converts the generate specification to a string containing the corresponding $GENERATE statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public long start
public long end
public long step
public final String namePattern
public final int type
public final int dclass
public final long ttl
public final String rdataPattern
public final Name origin
Constructor Detail |
---|
public Generator(long start, long end, long step, String namePattern, int type, int dclass, long ttl, String rdataPattern, Name origin)
start
- The start of the range.end
- The end of the range.step
- The step value of the range.namePattern
- The pattern to use for generating record names.type
- The type of the generated records. The supported types are
PTR, CNAME, DNAME, A, AAAA, and NS.dclass
- The class of the generated records.ttl
- The ttl of the generated records.rdataPattern
- The pattern to use for generating record data.origin
- The origin to append to relative names.
IllegalArgumentException
- The range is invalid.
IllegalArgumentException
- The type does not support generation.
IllegalArgumentException
- The dclass is not a valid class.Method Detail |
---|
public static boolean supportedType(int type)
InvalidTypeException
- The type is out of range.public Record nextRecord() throws IOException
IOException
- The name or rdata was invalid after substitutions were
performed.public Record[] expand() throws IOException
IOException
- The name or rdata of a record was invalid after
substitutions were performed.public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |