Search in sources :

Example 1 with ServiceTypeEntry

use of javax.jmdns.impl.JmDNSImpl.ServiceTypeEntry in project JAirPort by froks.

the class TypeResolver method addAnswers.

/*
     * (non-Javadoc)
     * @see javax.jmdns.impl.tasks.Resolver#addAnswers(javax.jmdns.impl.DNSOutgoing)
     */
@Override
protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException {
    DNSOutgoing newOut = out;
    long now = System.currentTimeMillis();
    for (String type : this.getDns().getServiceTypes().keySet()) {
        ServiceTypeEntry typeEntry = this.getDns().getServiceTypes().get(type);
        newOut = this.addAnswer(newOut, new DNSRecord.Pointer("_services._dns-sd._udp.local.", DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, typeEntry.getType()), now);
    }
    return newOut;
}
Also used : ServiceTypeEntry(javax.jmdns.impl.JmDNSImpl.ServiceTypeEntry) DNSOutgoing(javax.jmdns.impl.DNSOutgoing)

Aggregations

DNSOutgoing (javax.jmdns.impl.DNSOutgoing)1 ServiceTypeEntry (javax.jmdns.impl.JmDNSImpl.ServiceTypeEntry)1