com.apple.dnssd
Interface DNSSDRegistration

All Superinterfaces:
DNSSDService

public interface DNSSDRegistration
extends DNSSDService

A tracking object for a registration created by DNSSD.register(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, com.apple.dnssd.TXTRecord, com.apple.dnssd.RegisterListener).


Method Summary
 DNSRecord addRecord(int flags, int rrType, byte[] rData, int ttl)
          Add a record to a registered service.
 DNSRecord getTXTRecord()
          Get a reference to the primary TXT record of a registered service.
 
Methods inherited from interface com.apple.dnssd.DNSSDService
stop
 

Method Detail

getTXTRecord

DNSRecord getTXTRecord()
                       throws DNSSDException
Get a reference to the primary TXT record of a registered service.

The record can be updated by sending it an update() message.

Returns:
A DNSRecord. If DNSSDService.stop() is called, the DNSRecord is also invalidated and may not be used further.
Throws:
DNSSDException

addRecord

DNSRecord addRecord(int flags,
                    int rrType,
                    byte[] rData,
                    int ttl)
                    throws DNSSDException
Add a record to a registered service.

The name of the record will be the same as the registered service's name.

The record can be updated or deregistered by sending it an update() or remove() message.

Parameters:
flags - Currently unused, reserved for future use.

rrType - The type of the record (e.g. TXT, SRV, etc), as defined in nameser.h.

rData - The raw rdata to be contained in the added resource record.

ttl - The time to live of the resource record, in seconds.

Returns:
A DNSRecord that may be passed to updateRecord() or removeRecord(). If DNSSDService.stop() is called, the DNSRecord is also invalidated and may not be used further.
Throws:
DNSSDException