public class ZoneTransferIn extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZoneTransferIn.Delta
All changes between two versions of a zone in an IXFR response.
|
static interface |
ZoneTransferIn.ZoneTransferHandler
Handles a Zone Transfer.
|
Modifier and Type | Method and Description |
---|---|
List<Record> |
getAXFR()
Gets the AXFR-style response.
|
List<ZoneTransferIn.Delta> |
getIXFR()
Gets the IXFR-style response.
|
Name |
getName()
Gets the name of the zone being transferred.
|
int |
getType()
Gets the type of zone transfer (either AXFR or IXFR).
|
boolean |
isAXFR()
Returns true if the response is an AXFR-style response (List of Records).
|
boolean |
isCurrent()
Returns true if the response indicates that the zone is up to date.
|
boolean |
isIXFR()
Returns true if the response is an IXFR-style response (List of Deltas).
|
static ZoneTransferIn |
newAXFR(Name zone,
SocketAddress address,
TSIG key)
Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
|
static ZoneTransferIn |
newAXFR(Name zone,
String host,
int port,
TSIG key)
Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
|
static ZoneTransferIn |
newAXFR(Name zone,
String host,
TSIG key)
Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
|
static ZoneTransferIn |
newIXFR(Name zone,
long serial,
boolean fallback,
SocketAddress address,
TSIG key)
Instantiates a ZoneTransferIn object to do an IXFR (incremental zone transfer).
|
static ZoneTransferIn |
newIXFR(Name zone,
long serial,
boolean fallback,
String host,
int port,
TSIG key)
Instantiates a ZoneTransferIn object to do an IXFR (incremental zone transfer).
|
static ZoneTransferIn |
newIXFR(Name zone,
long serial,
boolean fallback,
String host,
TSIG key)
Instantiates a ZoneTransferIn object to do an IXFR (incremental zone transfer).
|
void |
run()
Does the zone transfer using an internal handler.
|
void |
run(ZoneTransferIn.ZoneTransferHandler handler)
Does the zone transfer.
|
void |
setDClass(int dclass)
Sets an alternate DNS class for this zone transfer.
|
void |
setLocalAddress(SocketAddress addr)
Sets the local address to bind to when sending messages.
|
void |
setTimeout(Duration t)
Sets a timeout on this zone transfer.
|
void |
setTimeout(int secs)
Deprecated.
|
public static ZoneTransferIn newAXFR(Name zone, SocketAddress address, TSIG key)
zone
- The zone to transfer.address
- The host/port from which to transfer the zone.key
- The TSIG key used to authenticate the transfer, or null.public static ZoneTransferIn newAXFR(Name zone, String host, int port, TSIG key)
zone
- The zone to transfer.host
- The host from which to transfer the zone.port
- The port to connect to on the server, or 0 for the default.key
- The TSIG key used to authenticate the transfer, or null.public static ZoneTransferIn newAXFR(Name zone, String host, TSIG key)
zone
- The zone to transfer.host
- The host from which to transfer the zone.key
- The TSIG key used to authenticate the transfer, or null.public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, SocketAddress address, TSIG key)
zone
- The zone to transfer.serial
- The existing serial number.fallback
- If true, fall back to AXFR if IXFR is not supported.address
- The host/port from which to transfer the zone.key
- The TSIG key used to authenticate the transfer, or null.public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, int port, TSIG key)
zone
- The zone to transfer.serial
- The existing serial number.fallback
- If true, fall back to AXFR if IXFR is not supported.host
- The host from which to transfer the zone.port
- The port to connect to on the server, or 0 for the default.key
- The TSIG key used to authenticate the transfer, or null.public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, TSIG key)
zone
- The zone to transfer.serial
- The existing serial number.fallback
- If true, fall back to AXFR if IXFR is not supported.host
- The host from which to transfer the zone.key
- The TSIG key used to authenticate the transfer, or null.public Name getName()
public int getType()
@Deprecated public void setTimeout(int secs)
setTimeout(Duration)
secs
- The maximum amount of time that this zone transfer can take.public void setTimeout(Duration t)
t
- The maximum amount of time that this zone transfer can take.public void setDClass(int dclass)
dclass
- The class to use instead of class IN.public void setLocalAddress(SocketAddress addr)
addr
- The local address to send messages from.public void run(ZoneTransferIn.ZoneTransferHandler handler) throws IOException, ZoneTransferException
handler
- The callback object that handles the zone transfer data.IOException
- The zone transfer failed to due an IO problem.ZoneTransferException
- The zone transfer failed to due a problem with the zone transfer
itself.public void run() throws IOException, ZoneTransferException
getAXFR()
or getIXFRIOException
- The zone transfer failed to due an IO problem.ZoneTransferException
- The zone transfer failed to due a problem with the zone transfer
itself.public boolean isAXFR()
public List<Record> getAXFR()
IllegalArgumentException
- The transfer used the callback interface, so the response was
not stored.public boolean isIXFR()
public List<ZoneTransferIn.Delta> getIXFR()
IllegalArgumentException
- The transfer used the callback interface, so the response was
not stored.public boolean isCurrent()
IllegalArgumentException
- The transfer used the callback interface, so the response was
not stored.Copyright © 2022 dnsjava.org. All rights reserved.