| java.lang.Object org.xbill.DNS.ZoneTransferIn
ZoneTransferIn | public class ZoneTransferIn (Code) | | An incoming DNS Zone Transfer. To use this class, first initialize an
object, then call the run() method. If run() doesn't throw an exception
the result will either be an IXFR-style response, an AXFR-style response,
or an indication that the zone is up to date.
author: Brian Wellington |
Inner Class :public static class Delta | |
Method Summary | |
public List | getAXFR() Gets the AXFR-style response. | public List | getIXFR() Gets the IXFR-style response. | public Name | getName() Gets the name of the zone being transferred. | public int | getType() Gets the type of zone transfer (either AXFR or IXFR). | public boolean | isAXFR() Returns true if the response is an AXFR-style response (List of Records). | public boolean | isCurrent() Returns true if the response indicates that the zone is up to date. | public boolean | isIXFR() Returns true if the response is an IXFR-style response (List of Deltas). | public static ZoneTransferIn | newAXFR(Name zone, SocketAddress address, TSIG key) Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: address - The host/port from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. | public static ZoneTransferIn | newAXFR(Name zone, String host, int port, TSIG key) Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: host - The host from which to transfer the zone. Parameters: port - The port to connect to on the server, or 0 for the default. Parameters: key - The TSIG key used to authenticate the transfer, or null. | public static ZoneTransferIn | newAXFR(Name zone, String host, TSIG key) Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: host - The host from which to transfer the zone. Parameters: 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) Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: address - The host/port from which to transfer the zone. Parameters: 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) Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: host - The host from which to transfer the zone. Parameters: port - The port to connect to on the server, or 0 for the default. Parameters: 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) Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: host - The host from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. | public List | run() Does the zone transfer. | public void | setDClass(int dclass) Sets an alternate DNS class for this zone transfer. | public void | setLocalAddress(SocketAddress addr) Sets the local address to bind to when sending messages. | public void | setTimeout(int secs) Sets a timeout on this zone transfer. |
getAXFR | public List getAXFR()(Code) | | Gets the AXFR-style response.
|
getIXFR | public List getIXFR()(Code) | | Gets the IXFR-style response.
|
getName | public Name getName()(Code) | | Gets the name of the zone being transferred.
|
getType | public int getType()(Code) | | Gets the type of zone transfer (either AXFR or IXFR).
|
isAXFR | public boolean isAXFR()(Code) | | Returns true if the response is an AXFR-style response (List of Records).
This will be true if either an IXFR was performed, an IXFR was performed
and the server provided a full zone transfer, or an IXFR failed and
fallback to AXFR occurred.
|
isCurrent | public boolean isCurrent()(Code) | | Returns true if the response indicates that the zone is up to date.
This will be true only if an IXFR was performed.
|
isIXFR | public boolean isIXFR()(Code) | | Returns true if the response is an IXFR-style response (List of Deltas).
This will be true only if an IXFR was performed and the server provided
an incremental zone transfer.
|
newAXFR | public static ZoneTransferIn newAXFR(Name zone, SocketAddress address, TSIG key)(Code) | | Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: address - The host/port from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
newAXFR | public static ZoneTransferIn newAXFR(Name zone, String host, int port, TSIG key) throws UnknownHostException(Code) | | Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: host - The host from which to transfer the zone. Parameters: port - The port to connect to on the server, or 0 for the default. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
newAXFR | public static ZoneTransferIn newAXFR(Name zone, String host, TSIG key) throws UnknownHostException(Code) | | Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer).
Parameters: zone - The zone to transfer. Parameters: host - The host from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
newIXFR | public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, SocketAddress address, TSIG key)(Code) | | Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: address - The host/port from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
newIXFR | public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, int port, TSIG key) throws UnknownHostException(Code) | | Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: host - The host from which to transfer the zone. Parameters: port - The port to connect to on the server, or 0 for the default. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
newIXFR | public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, TSIG key) throws UnknownHostException(Code) | | Instantiates a ZoneTransferIn object to do an IXFR (incremental zone
transfer).
Parameters: zone - The zone to transfer. Parameters: serial - The existing serial number. Parameters: fallback - If true, fall back to AXFR if IXFR is not supported. Parameters: host - The host from which to transfer the zone. Parameters: key - The TSIG key used to authenticate the transfer, or null. The ZoneTransferIn object. throws: UnknownHostException - The host does not exist. |
run | public List run() throws IOException, ZoneTransferException(Code) | | Does the zone transfer.
A list, which is either an AXFR-style response (List of Records),and IXFR-style response (List of Deltas), or null, which indicates thatan IXFR was performed and the zone is up to date. throws: IOException - The zone transfer failed to due an IO problem. throws: ZoneTransferException - The zone transfer failed to due a problemwith the zone transfer itself. |
setDClass | public void setDClass(int dclass)(Code) | | Sets an alternate DNS class for this zone transfer.
Parameters: dclass - The class to use instead of class IN. |
setLocalAddress | public void setLocalAddress(SocketAddress addr)(Code) | | Sets the local address to bind to when sending messages.
Parameters: addr - The local address to send messages from. |
setTimeout | public void setTimeout(int secs)(Code) | | Sets a timeout on this zone transfer. The default is 900 seconds (15
minutes).
Parameters: secs - The maximum amount of time that this zone transfer can take. |
|
|