Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jmdns')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java28
1 files changed, 1 insertions, 27 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
index c34b28d9c..3c1a8b2c0 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
@@ -11,13 +11,9 @@
package org.eclipse.ecf.provider.jmdns.identity;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.util.StringUtils;
import org.eclipse.ecf.discovery.identity.ServiceTypeID;
-import org.eclipse.ecf.internal.provider.jmdns.Messages;
-import org.eclipse.osgi.util.NLS;
/**
*
@@ -27,29 +23,7 @@ public class JMDNSServiceTypeID extends ServiceTypeID {
private static final long serialVersionUID = 7549266915001431139L;
protected JMDNSServiceTypeID(Namespace namespace, String type) throws IDCreateException {
- super(namespace);
- try {
- parse(type);
- createType();
- } catch (final Exception e) {
- throw new IDCreateException(NLS.bind(Messages.JMDNSServiceTypeID_EXCEPTION_INVALID_TYPE_ID, type));
- }
- }
-
- // Format of an DNS SRV RR _Service._Proto.Name
- // e.g. _ecftcp._tcp.local.
- // e.g. _service._dns-srv._udp.ecf.eclipse.org.
- private void parse(String type) {
- this.typeName = type;
- Assert.isNotNull(this.typeName);
- this.namingAuthority = DEFAULT_NA;
- final int protoBegin = type.lastIndexOf("_"); //$NON-NLS-1$
- final int protoEnd = type.indexOf(".", protoBegin); //$NON-NLS-1$
- protocols = new String[] {type.substring(protoBegin + 1, protoEnd)};
- scopes = new String[] {type.substring(protoEnd + 1, type.length() - 1)};
- String servicesString = type.substring(0, protoBegin - 1);
- servicesString = servicesString.substring(1);
- services = StringUtils.split(servicesString, "_"); //$NON-NLS-1$
+ super(namespace, type);
}
/* (non-Javadoc)

Back to the top