Package javax.jmdns.impl

Examples of javax.jmdns.impl.DNSEntry



                    // Answer questions
                    for (Iterator iterator = in.getQuestions().iterator(); iterator.hasNext();)
                    {
                        DNSEntry entry = (DNSEntry) iterator.next();
                        if (entry instanceof DNSQuestion)
                        {
                            DNSQuestion q = (DNSQuestion) entry;

                            // for unicast responses the question must be included
View Full Code Here


    @Test
    public void testCacheAddEntry() {
        DNSCache cache = new DNSCache();

        DNSEntry entry = new DNSRecord.Service("pierre._home-sharing._tcp.local.", DNSRecordClass.CLASS_IN, false, 0, 0, 0, 0, "panoramix.local.");
        cache.addDNSEntry(entry);
        assertEquals("Could not retrieve the value we inserted", entry, cache.getDNSEntry(entry));

    }
View Full Code Here

    @Test
    public void testCacheRemoveEntry() {
        DNSCache cache = new DNSCache();

        DNSEntry entry = new DNSRecord.Service("pierre._home-sharing._tcp.local.", DNSRecordClass.CLASS_IN, false, 0, 0, 0, 0, "panoramix.local.");
        cache.addDNSEntry(entry);
        assertEquals("Could not retrieve the value we inserted", entry, cache.getDNSEntry(entry));
        cache.removeDNSEntry(entry);
        assertNull("Could not remove the value we inserted", cache.getDNSEntry(entry));
View Full Code Here

        // We respond after 20-120 ms if the query is truncated.

        boolean iAmTheOnlyOne = true;
        for (Iterator i = in.getQuestions().iterator(); i.hasNext();)
        {
            DNSEntry entry = (DNSEntry) i.next();
            if (entry instanceof DNSQuestion)
            {
                DNSQuestion q = (DNSQuestion) entry;
//                logger.finest("start() question=" + q);
                iAmTheOnlyOne &= (q.getType() == DNSConstants.TYPE_SRV
View Full Code Here


                    // Answer questions
                    for (Iterator iterator = in.getQuestions().iterator(); iterator.hasNext();)
                    {
                        DNSEntry entry = (DNSEntry) iterator.next();
                        if (entry instanceof DNSQuestion)
                        {
                            DNSQuestion q = (DNSQuestion) entry;

                            // for unicast responses the question must be included
View Full Code Here

TOP

Related Classes of javax.jmdns.impl.DNSEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.