Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-01-22 12:24:08 -0500
committerslewis2011-01-22 12:24:08 -0500
commit7572205264b4fd4b64312de3df0431d8a4b541a0 (patch)
treef004b4ac3cb1bd4557e99e1f493a12d9ef100162 /incubation
parent3ad4acdcfab941b51d0976d000b5f8779ae0b91f (diff)
downloadorg.eclipse.ecf-7572205264b4fd4b64312de3df0431d8a4b541a0.tar.gz
org.eclipse.ecf-7572205264b4fd4b64312de3df0431d8a4b541a0.tar.xz
org.eclipse.ecf-7572205264b4fd4b64312de3df0431d8a4b541a0.zip
rsa changes it IEndpointDescriptionAdvertiser and impls
Diffstat (limited to 'incubation')
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionAdvertiser.java19
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionAdvertiser.java6
-rw-r--r--incubation/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java6
3 files changed, 9 insertions, 22 deletions
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionAdvertiser.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionAdvertiser.java
index 7fca2e196..411e44de8 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionAdvertiser.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescriptionAdvertiser.java
@@ -19,7 +19,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.ecf.discovery.IDiscoveryAdvertiser;
import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.Activator;
-import org.osgi.service.remoteserviceadmin.EndpointDescription;
public class EndpointDescriptionAdvertiser implements
IEndpointDescriptionAdvertiser {
@@ -75,8 +74,6 @@ public class EndpointDescriptionAdvertiser implements
Assert.isNotNull(endpointDescription);
String messagePrefix = advertise ? "Advertise" : "Unadvertise";
List<IStatus> statuses = new ArrayList<IStatus>();
- if (endpointDescription instanceof org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription) {
- org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription eed = (org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription) endpointDescription;
// First get serviceInfoFactory
IServiceInfoFactory serviceInfoFactory = getServiceInfoFactory();
if (serviceInfoFactory == null)
@@ -84,7 +81,7 @@ public class EndpointDescriptionAdvertiser implements
+ " endpointDescription="
+ endpointDescription
+ ". No IServiceInfoFactory is available. Cannot unpublish endpointDescription="
- + eed);
+ + endpointDescription);
IDiscoveryAdvertiser[] discoveryAdvertisers = getDiscoveryAdvertisers();
if (discoveryAdvertisers == null
|| discoveryAdvertisers.length == 0)
@@ -92,31 +89,25 @@ public class EndpointDescriptionAdvertiser implements
+ " endpointDescription="
+ endpointDescription
+ ". No endpointDescriptionLocator advertisers available. Cannot unpublish endpointDescription="
- + eed);
+ + endpointDescription);
for (int i = 0; i < discoveryAdvertisers.length; i++) {
IServiceInfo serviceInfo = (advertise ? serviceInfoFactory
.createServiceInfoForDiscovery(discoveryAdvertisers[i],
- eed) : serviceInfoFactory
+ endpointDescription) : serviceInfoFactory
.removeServiceInfoForUndiscovery(
- discoveryAdvertisers[i], eed));
+ discoveryAdvertisers[i], endpointDescription));
if (serviceInfo == null) {
statuses.add(createErrorStatus(messagePrefix
+ " endpointDescription="
+ endpointDescription
+ ". Service Info is null. Cannot publish endpointDescription="
- + eed));
+ + endpointDescription));
continue;
}
// Now actually unregister with advertiser
statuses.add(doDiscovery(discoveryAdvertisers[i], serviceInfo,
advertise));
}
- } else {
- statuses.add(createErrorStatus(messagePrefix
- + " endpointDescription="
- + endpointDescription
- + " is not of understood EndpointDescription type. Not advertising."));
- }
return createResultStatus(statuses, messagePrefix
+ " endpointDesription=" + endpointDescription
+ ". Problem in unadvertise");
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionAdvertiser.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionAdvertiser.java
index 9742cefaf..9e85780a4 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionAdvertiser.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/IEndpointDescriptionAdvertiser.java
@@ -13,10 +13,8 @@ import org.eclipse.core.runtime.IStatus;
public interface IEndpointDescriptionAdvertiser {
- public IStatus advertise(
- org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription);
+ public IStatus advertise(EndpointDescription endpointDescription);
- public IStatus unadvertise(
- org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription);
+ public IStatus unadvertise(EndpointDescription endpointDescription);
}
diff --git a/incubation/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java b/incubation/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java
index c4effd789..8c6c3ec2e 100644
--- a/incubation/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java
+++ b/incubation/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java
@@ -31,8 +31,7 @@ public abstract class AbstractEndpointDescriptionWriterTest extends
return new IEndpointDescriptionAdvertiser() {
@Override
- public IStatus advertise(
- org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription) {
+ public IStatus advertise(EndpointDescription endpointDescription) {
// TODO Auto-generated method stub
try {
StringWriter sr = new StringWriter();
@@ -48,8 +47,7 @@ public abstract class AbstractEndpointDescriptionWriterTest extends
}
@Override
- public IStatus unadvertise(
- org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription) {
+ public IStatus unadvertise(EndpointDescription endpointDescription) {
// TODO Auto-generated method stub
return Status.OK_STATUS;
}

Back to the top