se.unlogic.eagledns
Interface ZoneProvider

All Known Implementing Classes:
DBZoneProvider, FileZoneProvider, PathZoneProvider

public interface ZoneProvider

This interface is used to dynamicly load zones from different type of zone providers in runtime enabling zones to be added, updated and removed in runtime without restarting the EagleDNS dns server itself.

Author:
Unlogic

Method Summary
 java.util.Collection<org.xbill.DNS.Zone> getPrimaryZones()
          This method is called each time EagleDNS reloads it's zones.
 java.util.Collection<SecondaryZone> getSecondaryZones()
          This method is called each time EagleDNS reloads it's zones.
 void init(java.lang.String name)
          This method is called after the ZoneProvider has been instantiated by EagleDNS and all properties specified in the config file for this zone provider have been set using their set methods.
 void unload()
          This method is called when EagleDNS is shutdown or when the configuration has been updated and the ZoneProvider is no longer present in the configuration file.
 void zoneChecked(SecondaryZone secondaryZone)
          This method is called each time a zone has been downloaded and no changes have been detected (by comparing the serial)
 void zoneUpdated(SecondaryZone secondaryZone)
          This method is called when a change has been detected in a secondary zone previously loaded from this ZoneProvider.
 

Method Detail

init

void init(java.lang.String name)
          throws java.lang.Exception
This method is called after the ZoneProvider has been instantiated by EagleDNS and all properties specified in the config file for this zone provider have been set using their set methods.

Throws:
java.lang.Exception

getPrimaryZones

java.util.Collection<org.xbill.DNS.Zone> getPrimaryZones()
This method is called each time EagleDNS reloads it's zones. If no zones are found or if an error occurs the the ZoneProvider should return null else it should return all primary zones available from the zone provider.

Returns:

getSecondaryZones

java.util.Collection<SecondaryZone> getSecondaryZones()
This method is called each time EagleDNS reloads it's zones. If no zones are found or if an error occurs the the ZoneProvider should return null else it should return all secondary zones available from the zone provider. The returned secondary zones may contain a previously saved copy of the zone if the ZoneProvider supports this feature.

Returns:

zoneUpdated

void zoneUpdated(SecondaryZone secondaryZone)
This method is called when a change has been detected in a secondary zone previously loaded from this ZoneProvider. Failed AXFR requests will not trigger this method, although zone expiry will. The main purpose of this method is to enable the ZoneProviders to save the updated zone data which is useful in case EagleDNS is restarted when the primary DNS server of the zone is down.

Parameters:
zone -

zoneChecked

void zoneChecked(SecondaryZone secondaryZone)
This method is called each time a zone has been downloaded and no changes have been detected (by comparing the serial)

Parameters:
secondaryZone -

unload

void unload()
This method is called when EagleDNS is shutdown or when the configuration has been updated and the ZoneProvider is no longer present in the configuration file.



Copyright © 2011. All Rights Reserved.