Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-06-07 17:41:35 +0000
committerslewis2008-06-07 17:41:35 +0000
commit3d796b3a4794f06e4d0101d23bdc07394e2f1f1d (patch)
tree1f8e49fcaa611918843d75950d375222eb7261fd /providers/bundles/org.eclipse.ecf.provider.jmdns
parent21ddb9eb83e961b6af7ee91604e1000b2d6d1aa7 (diff)
downloadorg.eclipse.ecf-3d796b3a4794f06e4d0101d23bdc07394e2f1f1d.tar.gz
org.eclipse.ecf-3d796b3a4794f06e4d0101d23bdc07394e2f1f1d.tar.xz
org.eclipse.ecf-3d796b3a4794f06e4d0101d23bdc07394e2f1f1d.zip
Move to JmDNS 2.0. CQ: 2318
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jmdns')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/.classpath2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF3
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns-1.0.3.jarbin85684 -> 0 bytes
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns.jarbin0 -> 89810 bytes
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/DiscoveryStart.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java24
7 files changed, 27 insertions, 10 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/.classpath b/providers/bundles/org.eclipse.ecf.provider.jmdns/.classpath
index c6469a7d2..768caf2b2 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/.classpath
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib" path="lib/jmdns-1.0.3.jar" sourcepath="/jmdns-1.0"/>
+ <classpathentry exported="true" kind="lib" path="lib/jmdns.jar" sourcepath="/jmdns"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/.settings/org.eclipse.jdt.core.prefs b/providers/bundles/org.eclipse.ecf.provider.jmdns/.settings/org.eclipse.jdt.core.prefs
index 890af8d47..3976ba02b 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/.settings/org.eclipse.jdt.core.prefs
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Oct 15 23:38:57 PDT 2007
+#Mon May 19 14:41:02 PDT 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -34,6 +34,9 @@ org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=wa
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
@@ -41,6 +44,7 @@ org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
index 47b4d2b8e..36343434f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.equinox.common,
org.eclipse.ecf,
org.eclipse.ecf.discovery
Eclipse-LazyStart: true
-Bundle-ClassPath: ., lib/jmdns-1.0.3.jar
+Bundle-ClassPath: .,
+ lib/jmdns.jar
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
Export-Package: org.eclipse.ecf.internal.provider.jmdns;x-internal:=true,
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns-1.0.3.jar b/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns-1.0.3.jar
deleted file mode 100644
index 271547215..000000000
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns-1.0.3.jar
+++ /dev/null
Binary files differ
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns.jar b/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns.jar
new file mode 100644
index 000000000..e594b7550
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/lib/jmdns.jar
Binary files differ
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/DiscoveryStart.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/DiscoveryStart.java
index 87fb5c803..4c651cc07 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/DiscoveryStart.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/DiscoveryStart.java
@@ -22,7 +22,7 @@ public class DiscoveryStart implements IECFStart {
discoveryContainer.connect(null, null);
Properties props = new Properties();
props.put(IDiscoveryService.CONTAINER_ID, discoveryContainer.getID());
- props.put(IDiscoveryService.CONTAINER_NAME, "ecf.discovery.jmdns"); //$NON-NLS-1$
+ //props.put(IDiscoveryService.CONTAINER_NAME, "ecf.discovery.jmdns"); //$NON-NLS-1$
JMDNSPlugin.getDefault().getContext().registerService(IDiscoveryService.class.getName(), discoveryContainer, props);
} catch (Exception e) {
e.printStackTrace();
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
index f71111696..46faf9cfe 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
@@ -90,7 +90,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
fireContainerEvent(new ContainerConnectingEvent(this.getID(), this.targetID, joinContext));
initializeQueue();
try {
- this.jmdns = new JmDNS(intf);
+ this.jmdns = JmDNS.create(intf);
jmdns.addServiceTypeListener(this);
} catch (final IOException e) {
if (this.jmdns != null) {
@@ -321,12 +321,16 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
Trace.trace(JMDNSPlugin.PLUGIN_ID, "serviceAdded(" + arg0 + ")"); //$NON-NLS-1$ //$NON-NLS-2$
runInThread(new Runnable() {
public void run() {
- if (jmdns != null) {
+ JmDNS localJmdns = null;
+ synchronized (lock) {
+ localJmdns = jmdns;
+ }
+ if (localJmdns != null) {
String serviceType = arg0.getType();
String serviceName = arg0.getName();
Collection l = getAllListeners(createServiceID(serviceType, serviceName).getServiceTypeID());
if (l.size() > 0) {
- jmdns.requestServiceInfo(serviceType, serviceName, DEFAULT_REQUEST_TIMEOUT);
+ localJmdns.requestServiceInfo(serviceType, serviceName, DEFAULT_REQUEST_TIMEOUT);
}
}
}
@@ -344,7 +348,11 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
Trace.trace(JMDNSPlugin.PLUGIN_ID, "serviceRemoved(" + arg0 + ")"); //$NON-NLS-1$ //$NON-NLS-2$
runInThread(new Runnable() {
public void run() {
- if (jmdns != null) {
+ JmDNS localJmdns = null;
+ synchronized (lock) {
+ localJmdns = jmdns;
+ }
+ if (localJmdns != null) {
try {
fireUndiscovered(createIServiceInfoFromServiceEvent(arg0));
} catch (final Exception e) {
@@ -366,7 +374,11 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
Trace.trace(JMDNSPlugin.PLUGIN_ID, "serviceResolved(" + arg0 + ")"); //$NON-NLS-1$ //$NON-NLS-2$
runInThread(new Runnable() {
public void run() {
- if (jmdns != null) {
+ JmDNS localJmdns = null;
+ synchronized (lock) {
+ localJmdns = jmdns;
+ }
+ if (localJmdns != null) {
try {
fireDiscovered(createIServiceInfoFromServiceEvent(arg0));
} catch (final Exception e) {
@@ -467,7 +479,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
props.put(SCHEME_PROPERTY, location.getScheme());
int priority = (serviceInfo.getPriority() == -1) ? 0 : serviceInfo.getPriority();
int weight = (serviceInfo.getWeight() == -1) ? 0 : serviceInfo.getWeight();
- final ServiceInfo si = new ServiceInfo(sID.getServiceTypeID().getInternal(), sID.getServiceName(), location.getPort(), priority, weight, props);
+ final ServiceInfo si = ServiceInfo.create(sID.getServiceTypeID().getInternal(), sID.getServiceName(), location.getPort(), priority, weight, props);
return si;
}

Back to the top