- All Implemented Interfaces:
MasterService
- Author:
- AO Industries, Inc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDnsZone(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, String zone, InetAddress ip, int ttl) Creates a newZone.intaddRecord(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone, String domain, String type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) Creates a newRecord.booleancanAccessDnsZone(DatabaseConnection conn, RequestSource source, String zone) Gets the contents of thedns.TopLevelDomaintable.voidinvalidateTable(Table.TableId tableId) booleanisDnsZoneAvailable(DatabaseConnection conn, String zone) voidremoveDnsZone(DatabaseConnection conn, InvalidateList invalidateList, String zone) Removes aZone.voidremoveDnsZone(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone) Removes aZone.voidremoveRecord(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int recordId) Removes aRecord.voidremoveUnusedDnsRecord(DatabaseConnection conn, InvalidateList invalidateList, DomainName hostname, List<DomainName> tlds) voidsetDnsZoneTtl(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone, int ttl) Sets the default TTL for aZone.voidupdateDhcpDnsRecords(DatabaseConnection conn, InvalidateList invalidateList, int dhcpAddress, InetAddress destination) voidupdateReverseDnsIfExists(DatabaseConnection conn, InvalidateList invalidateList, InetAddress ip, DomainName hostname) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.aoindustries.aoserv.master.MasterService
start, startGetObjectHandler, startGetObjectHandlers, startGetTableHandler, startGetTableHandlers
-
Constructor Details
-
DnsService
public DnsService()
-
-
Method Details
-
addRecord
public int addRecord(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone, String domain, String type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) throws IOException, SQLException Creates a newRecord.- Throws:
IOExceptionSQLException
-
addDnsZone
public void addDnsZone(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, Account.Name packageName, String zone, InetAddress ip, int ttl) throws IOException, SQLException Creates a newZone.- Throws:
IOExceptionSQLException
-
removeRecord
public void removeRecord(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, int recordId) throws IOException, SQLException Removes aRecord.- Throws:
IOExceptionSQLException
-
removeDnsZone
public void removeDnsZone(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone) throws IOException, SQLException Removes aZone.- Throws:
IOExceptionSQLException
-
removeDnsZone
public void removeDnsZone(DatabaseConnection conn, InvalidateList invalidateList, String zone) throws IOException, SQLException Removes aZone.- Throws:
IOExceptionSQLException
-
canAccessDnsZone
public boolean canAccessDnsZone(DatabaseConnection conn, RequestSource source, String zone) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getTopLevelDomains
public List<DomainName> getTopLevelDomains(DatabaseConnection conn) throws IOException, SQLException Gets the contents of thedns.TopLevelDomaintable. Please note that these are only our manually configured entries, and do not contain the full list fromTopLevelDomain.Also, this is a list of effective top-level domains, for the purposes of domain allocation. This means it includes things like
com.au, whereas theTopLevelDomainonly includesau.TODO: Automatically maintain this list from the
TopLevelDomainsource, with an "auto" flag. Add/remove as-needed when auto.TODO: Have a flag "isRegistrable" that enables/disables a domain as being allowed for use by clients. Something marked isRegistrable and auto should never be removed? Instead of removing auto entries, have a "removed" timestamp showing when it no longer exists?
TODO: Allow a comment on each entry, too.
TODO: This could replace ForbiddenZones by adding more specific entries, and marking as isRegistrable=false?
- Throws:
IOExceptionSQLException
-
isDnsZoneAvailable
public boolean isDnsZoneAvailable(DatabaseConnection conn, String zone) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
invalidateTable
-
removeUnusedDnsRecord
public void removeUnusedDnsRecord(DatabaseConnection conn, InvalidateList invalidateList, DomainName hostname, List<DomainName> tlds) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
setDnsZoneTtl
public void setDnsZoneTtl(DatabaseConnection conn, RequestSource source, InvalidateList invalidateList, String zone, int ttl) throws IOException, SQLException Sets the default TTL for aZone.- Throws:
IOExceptionSQLException
-
updateDhcpDnsRecords
public void updateDhcpDnsRecords(DatabaseConnection conn, InvalidateList invalidateList, int dhcpAddress, InetAddress destination) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
updateReverseDnsIfExists
public void updateReverseDnsIfExists(DatabaseConnection conn, InvalidateList invalidateList, InetAddress ip, DomainName hostname) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
