Class ApplicationServiceRecordProcessor

java.lang.Object
org.apache.hadoop.registry.server.dns.BaseServiceRecordProcessor
org.apache.hadoop.registry.server.dns.ApplicationServiceRecordProcessor
All Implemented Interfaces:
ServiceRecordProcessor

public class ApplicationServiceRecordProcessor extends BaseServiceRecordProcessor
A processor for generating application DNS records from registry service records.
  • Constructor Details

    • ApplicationServiceRecordProcessor

      public ApplicationServiceRecordProcessor(ServiceRecord record, String path, String domain, ZoneSelector zoneSelector) throws Exception
      Create an application service record processor.
      Parameters:
      record - the service record
      path - the service record registry node path
      domain - the DNS zone/domain name
      zoneSelector - returns the zone associated with the provided name.
      Throws:
      Exception - if an issue is generated during instantiation.
  • Method Details

    • initTypeToInfoMapping

      public void initTypeToInfoMapping(ServiceRecord serviceRecord) throws Exception
      Initializes the DNS record type to descriptor mapping based on the provided service record.
      Parameters:
      serviceRecord - the registry service record.
      Throws:
      Exception - if an issue is encountered.
    • createTXTInfo

      protected void createTXTInfo(ServiceRecord serviceRecord) throws Exception
      Create an application TXT record descriptor.
      Parameters:
      serviceRecord - the service record.
      Throws:
      Exception - if there is an issue during descriptor creation.
    • createSRVInfo

      protected void createSRVInfo(ServiceRecord serviceRecord) throws Exception
      Create an application SRV record descriptor.
      Parameters:
      serviceRecord - the service record.
      Throws:
      Exception - if there is an issue during descriptor creation.
    • createCNAMEInfo

      protected void createCNAMEInfo(ServiceRecord serviceRecord) throws Exception
      Create an application CNAME record descriptor.
      Parameters:
      serviceRecord - the service record.
      Throws:
      Exception - if there is an issue during descriptor creation.
    • createAAAAInfo

      protected void createAAAAInfo(ServiceRecord record) throws Exception
      Create an application AAAA record descriptor.
      Parameters:
      record - the service record.
      Throws:
      Exception - if there is an issue during descriptor creation.
    • createAInfo

      protected void createAInfo(ServiceRecord record) throws Exception
      Create an application A record descriptor.
      Parameters:
      record - the service record.
      Throws:
      Exception - if there is an issue during descriptor creation.
    • getRecordTypes

      public int[] getRecordTypes()
      Returns the record types associated with a container service record.
      Returns:
      the record type array