Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/tasks/resolver/TypeResolver.java')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/tasks/resolver/TypeResolver.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/tasks/resolver/TypeResolver.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/tasks/resolver/TypeResolver.java
deleted file mode 100644
index 3b1ce45f7..000000000
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/jmdns/javax/jmdns/impl/tasks/resolver/TypeResolver.java
+++ /dev/null
@@ -1,84 +0,0 @@
-//Copyright 2003-2005 Arthur van Hoff, Rick Blair
-//Licensed under Apache License version 2.0
-//Original license LGPL
-
-package javax.jmdns.impl.tasks.resolver;
-
-import java.io.IOException;
-
-import javax.jmdns.impl.DNSOutgoing;
-import javax.jmdns.impl.DNSQuestion;
-import javax.jmdns.impl.DNSRecord;
-import javax.jmdns.impl.JmDNSImpl;
-import javax.jmdns.impl.constants.DNSConstants;
-import javax.jmdns.impl.constants.DNSRecordClass;
-import javax.jmdns.impl.constants.DNSRecordType;
-
-/**
- * Helper class to resolve service types.
- * <p/>
- * The TypeResolver queries three times consecutively for service types, and then removes itself from the timer.
- * <p/>
- * The TypeResolver will run only if JmDNS is in state ANNOUNCED.
- */
-public class TypeResolver extends DNSResolverTask
-{
-
- /**
- * @param jmDNSImpl
- */
- public TypeResolver(JmDNSImpl jmDNSImpl)
- {
- super(jmDNSImpl);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.jmdns.impl.tasks.DNSTask#getName()
- */
- @Override
- public String getName()
- {
- return "TypeResolver(" + (this.getDns() != null ? this.getDns().getName() : "") + ")";
- }
-
- /*
- * (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())
- {
- newOut = this.addAnswer(newOut, new DNSRecord.Pointer("_services._dns-sd._udp.local.", DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, type), now);
- }
- return newOut;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.jmdns.impl.tasks.Resolver#addQuestions(javax.jmdns.impl.DNSOutgoing)
- */
- @Override
- protected DNSOutgoing addQuestions(DNSOutgoing out) throws IOException
- {
- return this.addQuestion(out, DNSQuestion.newQuestion("_services._dns-sd._udp.local.", DNSRecordType.TYPE_PTR, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.jmdns.impl.tasks.Resolver#description()
- */
- @Override
- protected String description()
- {
- return "querying type";
- }
-} \ No newline at end of file

Back to the top