Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-01-15 02:53:57 +0000
committerslewis2011-01-15 02:53:57 +0000
commitec9cb7618d514b0a6a4bc0d895ca622cf3305696 (patch)
treebbab89f7165e9b41b3cae52bd1fe977982ea850c
parente1a95f36c362194b503722d9b0ff1b92bb4cab17 (diff)
downloadorg.eclipse.ecf-ec9cb7618d514b0a6a4bc0d895ca622cf3305696.tar.gz
org.eclipse.ecf-ec9cb7618d514b0a6a4bc0d895ca622cf3305696.tar.xz
org.eclipse.ecf-ec9cb7618d514b0a6a4bc0d895ca622cf3305696.zip
Fixes for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=334448
-rw-r--r--compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java7
-rw-r--r--compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/EventHookImpl.java10
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/plugin.xml3
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java37
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java15
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java152
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF6
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/AbstractRemoteServiceDescription.java90
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/ServiceTypeListener.java138
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java90
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/META-INF/MANIFEST.MF9
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/build.properties5
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch23
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/r-OSGi Remote EnvironmentInfo Server.launch22
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/plugin.xml11
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java103
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoverableServer.java182
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoveryProperties.java49
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/RemoteEnvironmentInfoImpl.java107
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.generic/.gitignore1
-rw-r--r--tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.r-osgi/.gitignore1
-rw-r--r--[-rwxr-xr-x]tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/.gitignore1
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/ServiceTrackerTest.java112
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/TransparentProxyTest.java106
24 files changed, 29 insertions, 1251 deletions
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
index a2923b016..c5c941b15 100644
--- a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
+++ b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
@@ -295,13 +295,6 @@ public class ServicePublicationHandler implements ServiceTrackerCustomizer,
targetNamespace);
}
- // add remote service namespace
- String rsnamespace = ServicePropertyUtils.getStringProperty(reference,
- Constants.SERVICE_NAMESPACE);
- if (rsnamespace != null)
- discoveryServiceProperties.setPropertyString(
- Constants.SERVICE_NAMESPACE, rsnamespace);
-
// and remote service id
final byte[] remoteServiceIDAsBytes = (byte[]) reference
.getProperty(Constants.SERVICE_ID);
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/EventHookImpl.java b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/EventHookImpl.java
index 7729b3983..faa6a49aa 100644
--- a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/EventHookImpl.java
+++ b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/EventHookImpl.java
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.ecf.internal.osgi.services.distribution;
-import org.eclipse.ecf.remoteservice.IOSGiRemoteServiceContainerAdapter;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -27,7 +25,6 @@ import org.eclipse.ecf.core.ContainerTypeDescription;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.IContainerManager;
import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.util.Trace;
import org.eclipse.ecf.osgi.services.discovery.RemoteServicePublication;
import org.eclipse.ecf.osgi.services.discovery.ServicePublication;
@@ -35,6 +32,7 @@ import org.eclipse.ecf.osgi.services.distribution.IDistributionConstants;
import org.eclipse.ecf.osgi.services.distribution.IHostContainerFinder;
import org.eclipse.ecf.osgi.services.distribution.IHostDistributionListener;
import org.eclipse.ecf.remoteservice.Constants;
+import org.eclipse.ecf.remoteservice.IOSGiRemoteServiceContainerAdapter;
import org.eclipse.ecf.remoteservice.IRemoteServiceContainer;
import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
import org.eclipse.ecf.remoteservice.IRemoteServiceRegistration;
@@ -234,12 +232,6 @@ public class EventHookImpl implements EventHook {
result.put(RemoteServicePublication.TARGET_CONTAINERID, targetID);
}
- // Set remote service namespace (String)
- Namespace rsnamespace = rsContainer.getContainerAdapter()
- .getRemoteServiceNamespace();
- if (rsnamespace != null)
- result.put(Constants.SERVICE_NAMESPACE, rsnamespace.getName());
-
// Set the actual remote service id (Long)
Long serviceId = (Long) remoteRegistration
.getProperty(Constants.SERVICE_ID);
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/plugin.xml b/framework/bundles/org.eclipse.ecf.remoteservice.ui/plugin.xml
index bcda26eea..0a799b317 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/plugin.xml
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/plugin.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
+<!--
<extension
point="org.eclipse.ui.commands">
<command
@@ -88,5 +89,5 @@
type="org.eclipse.ecf.discovery.ui.model.IServiceInfo">
</propertyTester>
</extension>
-
+-->
</plugin>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
index 4a4b3e98d..1f19c8567 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
@@ -13,16 +13,12 @@ package org.eclipse.ecf.internal.remoteservices.ui;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ecf.core.ContainerCreateException;
-import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.IContainerManager;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDCreateException;
-import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.discovery.ui.DiscoveryHandlerUtil;
-import org.eclipse.ecf.remoteservice.Constants;
import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
import org.eclipse.ecf.remoteservice.IRemoteServiceReference;
import org.osgi.framework.InvalidSyntaxException;
@@ -52,6 +48,7 @@ public class RemoteServiceHandlerUtil {
}
public static ID getActiveConnectIDChecked(ExecutionEvent event) throws ExecutionException {
+ /*
final IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
final String connectNamespace = getConnectNamespace(serviceInfo);
final String connectId = getConnectID(serviceInfo);
@@ -60,9 +57,12 @@ public class RemoteServiceHandlerUtil {
} catch (IDCreateException e) {
throw new ExecutionException(e.getMessage(), e);
}
+ */
+ return null;
}
public static IContainer getActiveIRemoteServiceContainerChecked(ExecutionEvent event) throws ExecutionException {
+ /*
final IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
final ID createConnectId = getActiveConnectIDChecked(event);
final IContainer container = getContainerWithConnectID(createConnectId);
@@ -77,6 +77,8 @@ public class RemoteServiceHandlerUtil {
} catch (ContainerCreateException e) {
throw new ExecutionException(e.getMessage(), e);
}
+ */
+ return null;
}
//TODO push this functionality down into the ContainerManager
@@ -96,7 +98,8 @@ public class RemoteServiceHandlerUtil {
}
private static IRemoteServiceReference[] getRemoteServiceReferencesForRemoteServiceAdapter(IRemoteServiceContainerAdapter adapter, IServiceInfo serviceInfo) throws InvalidSyntaxException, IDCreateException {
- if(adapter == null) {
+ return null;
+ /*
return null;
}
ID serviceID = null;
@@ -106,28 +109,8 @@ public class RemoteServiceHandlerUtil {
serviceID = IDFactory.getDefault().createID(serviceNamespace, serviceid);
}
final ID[] targets = (serviceID == null) ? null : new ID[] {serviceID};
- return adapter.getRemoteServiceReferences(targets, getRemoteServiceClass(serviceInfo), getFilter(serviceInfo));
+ return adapter.getRemoteServiceReferences(targets, getRemoteServiceClass(serviceInfo), null);
+ */
}
- private static String getServiceNamespace(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_IDFILTER_NAMESPACE);
- }
- private static String getServiceID(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_IDFILTER_ID);
- }
- private static String getRemoteServiceClass(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_OBJECTCLASS);
- }
- private static String getFilter(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_FILTER_PROPERTY);
- }
- private static String getConnectNamespace(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_CONNECT_ID_NAMESPACE);
- }
- private static String getConnectID(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_CONNECT_ID);
- }
- private static String getContainerFactory(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_CONTAINER_FACTORY_NAME);
- }
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
index 620c678da..bd2a76807 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
@@ -15,12 +15,7 @@ import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.IContainerManager;
import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.identity.IDCreateException;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.discovery.IServiceInfo;
-import org.eclipse.ecf.discovery.ui.DiscoveryPropertyTesterUtil;
import org.eclipse.ecf.internal.remoteservices.ui.Activator;
-import org.eclipse.ecf.remoteservice.Constants;
public class ConnectedTester extends PropertyTester {
@@ -51,6 +46,8 @@ public class ConnectedTester extends PropertyTester {
}
private boolean hasContainer(Object receiver) {
+ return false;
+ /*
// get the container instance
IServiceInfo serviceInfo = DiscoveryPropertyTesterUtil.getIServiceInfoReceiver(receiver);
final String connectNamespace = getConnectNamespace(serviceInfo);
@@ -62,6 +59,7 @@ public class ConnectedTester extends PropertyTester {
//Trace.trace(...);
return false;
}
+ */
}
@@ -86,11 +84,4 @@ public class ConnectedTester extends PropertyTester {
}
- private String getConnectNamespace(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_CONNECT_ID_NAMESPACE);
- }
-
- private String getConnectID(IServiceInfo serviceInfo) {
- return serviceInfo.getServiceProperties().getPropertyString(Constants.SERVICE_CONNECT_ID);
- }
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
index 9d8b479cc..6be0593ca 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/Constants.java
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004, 2009 Composent, Inc. and others.
+ * Copyright (c) 2004-2011 Composent, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,8 +11,6 @@
package org.eclipse.ecf.remoteservice;
-import org.eclipse.ecf.core.IContainer;
-
/**
* Remote service API constants.
*/
@@ -31,7 +29,7 @@ public interface Constants {
/**
* Remote service property (named &quot;ecf.rsvc.id&quot;) identifying a
- * service's registration number (of type <code>java.lang.Long</code>).
+ * service's remote registration number (of type <code>java.lang.Long</code>).
*
* <p>
* The value of this property is assigned by the remote services API when a
@@ -75,30 +73,6 @@ public interface Constants {
public static final String SERVICE_RANKING = "ecf.rsvc.ranking"; //$NON-NLS-1$
/**
- * Service property (named &quot;remote.service.vendor&quot;) identifying a
- * service's vendor.
- *
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the
- * <code>IRemoteServiceContainerAdapter.registerRemoteService</code>
- * method.
- */
- public static final String SERVICE_VENDOR = "ecf.rsvc.vendor"; //$NON-NLS-1$
-
- /**
- * Service property (named &quot;remoteservice.description&quot;)
- * identifying a service's description.
- *
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the
- * <code>IRemoteServiceContainerAdapter.registerRemoteService</code>
- * method.
- */
- public static final String SERVICE_DESCRIPTION = "ecf.rsvc.desc"; //$NON-NLS-1$
-
- /**
* Service property (named &quot;remoteservice.description&quot;)
* identifying a a registration's target for receiving the service. The
* value of the property MUST be either a non-<code>null</code> instance
@@ -112,37 +86,6 @@ public interface Constants {
public static final String SERVICE_REGISTRATION_TARGETS = "ecf.rsvc.reg.targets"; //$NON-NLS-1$
/**
- * Remote service property that defines the container factory name.
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the
- * <code>IRemoteServiceContainerAdapter.registerRemoteService</code>
- * method.
- * @since 3.0
- */
- public static final String SERVICE_CONTAINER_FACTORY_NAME = "ecf.rsvc.cfn"; //$NON-NLS-1$
-
- /**
- * Service property that defines the container target for connection.
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the
- * <code>IRemoteServiceContainerAdapter.registerRemoteService</code>
- * method.
- * @since 3.0
- */
- public static final String SERVICE_CONTAINER_TARGET = "ecf.rsvc.target"; //$NON-NLS-1$
-
- /**
- * Service property that defines the remote service container ID factory name.
- * <p>
- * This property may be supplied in the properties <code>Dictionary</code>
- * object passed to the <code>BundleContext.registerService</code> method.
- * @since 3.0
- */
- public static final String SERVICE_CONTAINER_ID_FACTORY = "ecf.rsvc.cidf"; //$NON-NLS-1$
-
- /**
* Remote service property that defines the remote service container ID.
* <p>
* This property may be supplied in the properties <code>Dictionary</code>
@@ -152,98 +95,11 @@ public interface Constants {
public static final String SERVICE_CONTAINER_ID = "ecf.rsvc.cid"; //$NON-NLS-1$
/**
- * Remote service property that defines the remote service container ID.
- * <p>
- * @since 5.0
- */
- public static final String SERVICE_PROXY_CONTAINER_ID = "ecf.rsvc.pcid"; //$NON-NLS-1$
-
- /**
- * Service property that determines whether a remote service proxy is automatically added to the local
- * service registry. This property can be used to expose remote services transparently
- * to client (i.e. automatically putting a proxy into the client's local service registry).
- * If this property is set in during service registration, then the the associated remote
- * service proxy should be added to the client's service registry by the implementing provider. The value
- * of the property can be any non-<code>null</code> value.
- * <p></p>
- * For example:
- * <pre>
- * final Dictionary props = new Hashtable();
- * props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true");
- * // Register
- * adapters[0].registerRemoteService(new String[] {IConcatService.class.getName()}, serviceImpl, props);
- * </pre>
- *
- */
- public static final String AUTOREGISTER_REMOTE_PROXY = "ecf.rsvc.areg"; //$NON-NLS-1$
-
- // Constants for use with the ECF remote services API
-
- /**
- * Discovery service property to specify a namespace name for creating a connect id. Note that
- * this property should be equal to the name of the namespace retrieved from {@link IContainer#getConnectNamespace()}.
- * Note that this property is <b>optional</b>.
- * @since 3.0
- */
- public static final String SERVICE_CONNECT_ID_NAMESPACE = "ecf.rsvc.cnct.id.ns"; //$NON-NLS-1$
-
- /**
- * Discovery service property to specify value for creating a connect id. Note that
- * this property should be equal to connectID retrieved from {@link IContainer#getConnectedID()}.
- * Note that this property is <b>optional</b>.
- * @since 3.0
- */
- public static final String SERVICE_CONNECT_ID = "ecf.rsvc.cnct.id"; //$NON-NLS-1$
-
- /**
- * Discovery service property to specify a namespace name for creating a target service ID.
- * Note that this property is <b>optional</b>. It is
- * expected that clients will use the value of this property, along with the SERVICE_ID_PROPERTY
- * to create an ID instance for the 'idFilter' parameter via
- * remoteServicesContainerAdapter.getRemoteServiceReferences(ID [] idFilter, String clazz, String filter).
- * @since 3.0
- */
- public static final String SERVICE_IDFILTER_NAMESPACE = "ecf.rsvc.idfltr.ns"; //$NON-NLS-1$
-
- /**
- * Discovery service property for a 'remotesvcs' discovery type. Note that this
- * property is <b>optional</b>. It is expected
- * that clients will use the value of this property, along with the SERVICE_IDFILTER_NAMESPACE
- * to create an ID instance for the 'idFilter' parameter via
- * remoteServicesContainerAdapter.getRemoteServiceReferences(ID [] idFilter, String clazz, String filter).
- * @since 3.0
- */
- public static final String SERVICE_IDFILTER_ID = "ecf.rsvc.idfltr.id"; //$NON-NLS-1$
-
- /**
- * Discovery Service property specifying the clazz paramter in
- * remoteServiceContainerAdapter.getRemoteServiceReferences(ID [] idFilter, String clazz, String filter);
- * @since 3.0
- */
- public static final String SERVICE_OBJECTCLASS = "ecf.rsvc.robjectclass"; //$NON-NLS-1$
-
- /**
- * Discovery service property for specifying the service lookup filter for
- * client service lookup via
- * remoteServicesContainerAdapter.getRemoteServiceReferences(ID [] idFilter, String clazz, String filter).
- * Note that this
- * property is <b>optional</b> if the DISCOVERY_SERVICE_TYPE is as given above.
- * @since 3.0
- */
- public static final String SERVICE_FILTER_PROPERTY = "ecf.rsvc.fltr"; //$NON-NLS-1$
-
- /**
- * Discovery service property specifying the expected namespace name for corresponding
- * to remoteServiceContainerAdapter.getRemoteServicesNamespace()
- * @since 3.0
- */
- public static final String SERVICE_NAMESPACE = "ecf.rsvc.ns"; //$NON-NLS-1$
-
- /**
- * Service property used on service registration to indicate that a service proxy
+ * Remote service property used on service registration to indicate that a service proxy
* should be created rather than using the given service object (which may be null
* when this service property is set).
* @since 4.0
*/
public static final String SERVICE_REGISTER_PROXY = "ecf.rsvc.proxy"; //$NON-NLS-1$
+
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
index 3221dda16..6a826e50c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/META-INF/MANIFEST.MF
@@ -11,14 +11,12 @@ Eclipse-BuddyPolicy: global
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
Export-Package: org.eclipse.ecf.internal.provider.remoteservice;x-internal:=true,
- org.eclipse.ecf.provider.remoteservice,
- org.eclipse.ecf.provider.remoteservice.generic
+ org.eclipse.ecf.provider.remoteservice.generic;version="4.0.0"
Require-Bundle: org.eclipse.equinox.common,
org.eclipse.ecf,
org.eclipse.ecf.sharedobject,
org.eclipse.ecf.provider,
- org.eclipse.ecf.remoteservice;bundle-version="6.0.0",
- org.eclipse.ecf.discovery
+ org.eclipse.ecf.remoteservice;bundle-version="6.0.0"
Import-Package: org.eclipse.core.runtime.jobs,
org.eclipse.equinox.concurrent.future,
org.eclipse.osgi.framework.eventmgr,
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/AbstractRemoteServiceDescription.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/AbstractRemoteServiceDescription.java
deleted file mode 100644
index fb1ee5ea4..000000000
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/AbstractRemoteServiceDescription.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.remoteservice;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.core.identity.*;
-import org.eclipse.ecf.core.util.*;
-import org.eclipse.ecf.discovery.IServiceInfo;
-import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
-
-/**
- *
- */
-public abstract class AbstractRemoteServiceDescription {
-
- private ID discoveryID;
- private IServiceInfo serviceInfo;
-
- private IContainerFilter remoteServiceAdapterFilter = new AdapterContainerFilter(IRemoteServiceContainerAdapter.class);
-
- private IContainerFilter connectedFilter = new ConnectedContainerFilter();
-
- public AbstractRemoteServiceDescription(IServiceInfo serviceInfo, ID discoveryID) {
- Assert.isNotNull(serviceInfo);
- this.serviceInfo = serviceInfo;
- this.discoveryID = null;
- }
-
- public ID getDiscoveryID() {
- return this.discoveryID;
- }
-
- public IServiceInfo getServiceInfo() {
- return this.serviceInfo;
- }
-
- public abstract Object createProxy() throws Exception;
-
- protected String getProperty(String key) {
- return serviceInfo.getServiceProperties().getPropertyString(key);
- }
-
- protected String[] getInterfaces() {
- String val = serviceInfo.getServiceProperties().getPropertyString(org.eclipse.ecf.remoteservice.Constants.OBJECTCLASS);
- return org.eclipse.ecf.core.util.StringUtils.split(val, ";"); //$NON-NLS-1$
- }
-
- public String getContainerFactoryName() {
- return getProperty(org.eclipse.ecf.remoteservice.Constants.SERVICE_CONTAINER_FACTORY_NAME);
- }
-
- public IContainer createContainer() throws ContainerCreateException {
- String containerFactoryName = getContainerFactoryName();
- if (containerFactoryName == null)
- return ContainerFactory.getDefault().createContainer();
- return ContainerFactory.getDefault().createContainer(containerFactoryName);
- }
-
- protected IContainer[] getMatchingContainers(IContainerFilter filter, IContainer[] sourceContainers) {
- List results = new ArrayList();
- for (int i = 0; i < sourceContainers.length; i++)
- if (filter.match(sourceContainers[i]))
- results.add(sourceContainers[i]);
- return (IContainer[]) results.toArray(new IContainer[] {});
- }
-
- public IContainer[] getRemoteServicesContainers(IContainer[] sourceContainers) {
- return getMatchingContainers(remoteServiceAdapterFilter, sourceContainers);
- }
-
- public IContainer[] getConnectedContainers(IContainer[] sourceContainers) {
- return getMatchingContainers(connectedFilter, sourceContainers);
- }
-
- public ID createTargetID(Namespace namespace) throws IDCreateException {
- return IDFactory.getDefault().createID(namespace, getProperty(org.eclipse.ecf.remoteservice.Constants.SERVICE_CONTAINER_TARGET));
- }
-}
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/ServiceTypeListener.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/ServiceTypeListener.java
deleted file mode 100644
index 0dbc7c72a..000000000
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/ServiceTypeListener.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.remoteservice;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.discovery.*;
-import org.eclipse.ecf.discovery.identity.IServiceTypeID;
-
-/**
- * Helper class for setting up service listeners for a given serviceTypeID.
- */
-public class ServiceTypeListener implements IServiceTypeListener {
-
- private final IDiscoveryLocator discovery;
- private final IServiceTypeID[] serviceTypeIDs;
- final IServiceListener serviceListener;
- private final String[] requiredProperties;
-
- class ServiceListener implements IServiceListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.discovery.IServiceListener#serviceDiscovered(org.eclipse.ecf.discovery.IServiceEvent)
- */
- public void serviceDiscovered(IServiceEvent anEvent) {
- final IServiceInfo svcInfo = anEvent.getServiceInfo();
- if (hasRequiredProperties(svcInfo.getServiceProperties()))
- serviceListener.serviceDiscovered(anEvent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.discovery.IServiceListener#serviceUndiscovered(org.eclipse.ecf.discovery.IServiceEvent)
- */
- public void serviceUndiscovered(IServiceEvent anEvent) {
- final IServiceInfo svcInfo = anEvent.getServiceInfo();
- if (hasRequiredProperties(svcInfo.getServiceProperties()))
- serviceListener.serviceUndiscovered(anEvent);
- }
- }
-
- /**
- *
- * @param discovery discovery adapter instance to set up. Must not be <code>null</code>.
- * @param serviceListener service listener to receive notifications of service added/removed and resolved notifications. Must not be <code>null</code>.
- * @param serviceTypeIDs service type IDs to setup service listeners for. May be <code>null</code>. If <code>null</code>, then
- * all service types will notify the given serviceListener.
- * @param requiredProperties properties required of the service info
- * @since 3.0
- */
- public ServiceTypeListener(IDiscoveryLocator discovery, IServiceListener serviceListener, IServiceTypeID[] serviceTypeIDs, String[] requiredProperties) {
- this.discovery = discovery;
- Assert.isNotNull(this.discovery);
- this.serviceListener = serviceListener;
- Assert.isNotNull(this.serviceListener);
- this.serviceTypeIDs = serviceTypeIDs;
- this.requiredProperties = requiredProperties;
- }
-
- /**
- *
- * @param discovery discovery adapter instance to set up. Must not be <code>null</code>.
- * @param serviceListener service listener to receive notifications of service added/removed and resolved notifications. Must not be <code>null</code>.
- * @param serviceTypeID service type IDs to setup service listeners for. May be <code>null</code>. If <code>null</code>, then
- * all service types will notify the given serviceListener.
- * @param requiredProperties properties required of the service info
- * @since 3.0
- */
- public ServiceTypeListener(IDiscoveryLocator discovery, IServiceListener serviceListener, IServiceTypeID serviceTypeID, String[] requiredProperties) {
- this(discovery, serviceListener, new IServiceTypeID[] {serviceTypeID}, requiredProperties);
- }
-
- /**
- *
- * @param discovery discovery adapter instance to set up. Must not be <code>null</code>.
- * @param serviceListener service listener to receive notifications of service added/removed and resolved notifications. Must not be <code>null</code>.
- * @param serviceTypeID service type IDs to setup service listeners for. May be <code>null</code>. If <code>null</code>, then
- * all service types will notify the given serviceListener.
- * @since 3.0
- */
- public ServiceTypeListener(IDiscoveryLocator discovery, IServiceListener serviceListener, IServiceTypeID serviceTypeID) {
- this(discovery, serviceListener, new IServiceTypeID[] {serviceTypeID}, null);
- }
-
- /**
- * @param discovery discovery adapter instance to set up. Must not be <code>null</code>.
- * @param serviceListener service listener to receive notifications of service added/removed and resolved notifications. Must not be <code>null</code>.
- * @since 3.0
- */
- public ServiceTypeListener(IDiscoveryLocator discovery, IServiceListener serviceListener) {
- this(discovery, serviceListener, (IServiceTypeID[]) null, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.discovery.IServiceTypeListener#serviceTypeAdded(org.eclipse.ecf.discovery.IServiceTypeEvent)
- */
- public final void serviceTypeAdded(IServiceTypeEvent event) {
- final IServiceTypeID remoteServiceTypeID = event.getServiceTypeID();
- if (hasRequiredTypeID(remoteServiceTypeID)) {
- this.discovery.addServiceListener(remoteServiceTypeID, serviceListener);
- }
- }
-
- private boolean hasRequiredTypeID(IServiceTypeID remoteServiceTypeID) {
- if (serviceTypeIDs == null)
- return true;
- for (int i = 0; i < serviceTypeIDs.length; i++)
- if (remoteServiceTypeID.equals(serviceTypeIDs[i]))
- return true;
- return false;
- }
-
- boolean hasRequiredProperties(IServiceProperties serviceProperties) {
- if (requiredProperties == null)
- return true;
- for (int i = 0; i < requiredProperties.length; i++)
- if (serviceProperties.getProperty(requiredProperties[i]) == null)
- return false;
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.discovery.IServiceTypeListener#serviceTypeDiscovered(org.eclipse.ecf.discovery.IServiceEvent)
- */
- public void serviceTypeDiscovered(IServiceTypeEvent event) {
- final IServiceTypeID remoteServiceTypeID = event.getServiceTypeID();
- if (hasRequiredTypeID(remoteServiceTypeID)) {
- this.discovery.addServiceListener(remoteServiceTypeID, serviceListener);
- }
- }
-}
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
index 61dfad5f9..cc4f658e9 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice/src/org/eclipse/ecf/provider/remoteservice/generic/RegistrySharedObject.java
@@ -26,11 +26,10 @@ import org.eclipse.ecf.core.util.*;
import org.eclipse.ecf.internal.provider.remoteservice.Activator;
import org.eclipse.ecf.internal.provider.remoteservice.IRemoteServiceProviderDebugOptions;
import org.eclipse.ecf.remoteservice.*;
-import org.eclipse.ecf.remoteservice.Constants;
import org.eclipse.ecf.remoteservice.events.*;
import org.eclipse.equinox.concurrent.future.*;
import org.eclipse.osgi.framework.eventmgr.*;
-import org.osgi.framework.*;
+import org.osgi.framework.InvalidSyntaxException;
public class RegistrySharedObject extends BaseSharedObject implements IRemoteServiceContainerAdapter {
@@ -58,10 +57,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
*/
protected final List serviceListeners = new ArrayList();
/**
- * Local remote service registrations. key: ID (identifier of remote container), value: List (instances of RemoteServiceRegistrationImpl for remote container)
- */
- protected final Map localServiceRegistrations = new HashMap();
- /**
* Map of add registration requests. key: Integer (unique Request id), value: AddRegistrationRequest
*/
protected Map addRegistrationRequests = new Hashtable();
@@ -431,8 +426,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
* @see org.eclipse.ecf.core.sharedobject.BaseSharedObject#dispose(org.eclipse.ecf.core.identity.ID)
*/
public void dispose(ID containerID) {
- unregisterAllServiceRegistrations();
-
synchronized (rsQueueLock) {
if (rsListenerDispatchEventManager != null) {
rsListenerDispatchEventManager.close();
@@ -442,7 +435,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
}
synchronized (remoteRegistrys) {
remoteRegistrys.clear();
- localServiceRegistrations.clear();
}
synchronized (serviceListeners) {
serviceListeners.clear();
@@ -658,7 +650,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
if (regs != null) {
for (int j = 0; j < regs.length; j++) {
registry.unpublishService(regs[j]);
- unregisterServiceRegistrationsForContainer(regs[j].getContainerID());
registrations.add(regs[j]);
}
}
@@ -680,7 +671,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
if (registrations != null) {
for (int i = 0; i < registrations.length; i++) {
registry.unpublishService(registrations[i]);
- unregisterServiceRegistrationsForContainer(registrations[i].getContainerID());
}
}
}
@@ -1255,7 +1245,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
if (!regList.contains(registrations[i])) {
addedRegistrations.add(registrations[i]);
registry.publishService(registrations[i]);
- localRegisterService(registrations[i]);
}
}
}
@@ -1294,7 +1283,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
if (!regList.contains(registration)) {
added = true;
registry.publishService(registration);
- localRegisterService(registration);
}
notifyAddRegistrationResponse(remoteContainerID, requestId, null);
}
@@ -1324,50 +1312,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
}
}
- /**
- * @since 3.2
- */
- protected void localRegisterService(RemoteServiceRegistrationImpl registration) {
- final Object localServiceRegistrationValue = registration.getProperty(org.eclipse.ecf.remoteservice.Constants.AUTOREGISTER_REMOTE_PROXY);
- if (localServiceRegistrationValue != null) {
- final BundleContext context = Activator.getDefault().getContext();
- if (context == null)
- return;
- final RemoteServiceImpl remoteServiceImpl = new RemoteServiceImpl(this, registration);
- Object service;
- try {
- service = remoteServiceImpl.getProxy();
- } catch (final ECFException e) {
- e.printStackTrace();
- log("localRegisterService", e); //$NON-NLS-1$
- return;
- }
- final Hashtable properties = new Hashtable();
- final String[] keys = registration.getPropertyKeys();
- for (int i = 0; i < keys.length; i++) {
- final Object value = registration.getProperty(keys[i]);
- if (value != null) {
- properties.put(keys[i], value);
- }
- }
- final ID remoteContainerID = registration.getContainerID();
- final ServiceRegistration serviceRegistration = context.registerService(registration.getClasses(), service, properties);
- addLocalServiceRegistration(remoteContainerID, serviceRegistration);
- }
- }
-
- /**
- * @since 3.2
- */
- protected void addLocalServiceRegistration(ID remoteContainerID, ServiceRegistration registration) {
- List containerRegistrations = (List) localServiceRegistrations.get(remoteContainerID);
- if (containerRegistrations == null) {
- containerRegistrations = new ArrayList();
- localServiceRegistrations.put(remoteContainerID, containerRegistrations);
- }
- containerRegistrations.add(registration);
- }
-
protected Request sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration, final IRemoteCall call) throws IOException {
Trace.entering(Activator.PLUGIN_ID, IRemoteServiceProviderDebugOptions.METHODS_ENTERING, this.getClass(), "sendCallRequest", new Object[] {remoteRegistration, call}); //$NON-NLS-1$
final Request request = createRequest(remoteRegistration, call, null);
@@ -1679,7 +1623,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
registration = serviceRegistry.findRegistrationForServiceId(serviceId.longValue());
if (registration != null) {
serviceRegistry.unpublishService(registration);
- unregisterServiceRegistrationsForContainer(registration.getContainerID());
// If there are no remaining registration for this remote service registry,
// then remove the registry from the remoteRegistrys
RemoteServiceRegistrationImpl[] registrations = serviceRegistry.getRegistrations();
@@ -1695,37 +1638,6 @@ public class RegistrySharedObject extends BaseSharedObject implements IRemoteSer
Trace.exiting(Activator.PLUGIN_ID, IRemoteServiceProviderDebugOptions.METHODS_EXITING, this.getClass(), "handleUnregister"); //$NON-NLS-1$
}
- /**
- * @since 3.2
- */
- protected void unregisterServiceRegistrationsForContainer(ID containerID) {
- if (containerID == null)
- return;
- final List containerRegistrations = (List) localServiceRegistrations.remove(containerID);
- if (containerRegistrations != null) {
- for (final Iterator i = containerRegistrations.iterator(); i.hasNext();) {
- final ServiceRegistration serviceRegistration = (ServiceRegistration) i.next();
- try {
- serviceRegistration.unregister();
- } catch (Exception e) {
- // Simply log
- log("unregister", e); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * @since 3.2
- */
- protected void unregisterAllServiceRegistrations() {
- synchronized (remoteRegistrys) {
- for (final Iterator i = localServiceRegistrations.keySet().iterator(); i.hasNext();) {
- unregisterServiceRegistrationsForContainer((ID) i.next());
- }
- }
- }
-
protected IRemoteServiceUnregisteredEvent createUnregisteredEvent(final RemoteServiceRegistrationImpl registration) {
return new IRemoteServiceUnregisteredEvent() {
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/META-INF/MANIFEST.MF b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/META-INF/MANIFEST.MF
index eb7da04b6..6bdc05db1 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/META-INF/MANIFEST.MF
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/META-INF/MANIFEST.MF
@@ -2,17 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.server;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.ecf.internal.examples.remoteservices.server.Activator
Bundle-Vendor: %plugin.provider
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ecf.examples.remoteservices.common,
- org.eclipse.ecf,
- org.eclipse.ecf.discovery,
- org.eclipse.ecf.remoteservice
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
Eclipse-LazyStart: true
-Export-Package: org.eclipse.ecf.internal.examples.remoteservices.server;x-friends:="org.eclipse.ecf.examples.remoteservices.server.transparent"
Bundle-ActivationPolicy: lazy
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/build.properties b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/build.properties
index 521e3b5c8..ed973e7de 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/build.properties
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/build.properties
@@ -4,9 +4,8 @@ bin.includes = META-INF/,\
.,\
about.html,\
plugin.properties,\
- plugin.xml,\
- launch/
+ readme.txt
src.includes = about.html,\
- launch/
+ readme.txt
jre.compilation.profile = J2SE-1.4
javacErrors.. = -assertIdentifier,-enumIdentifier
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch
deleted file mode 100644
index 35865a7b4..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Generic Remote EnvironmentInfo Server"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.ecf.examples.remoteservices.server.remoteServicesServer -debug"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dnet.slp.port=10427&#13;&#10;-Dch.ethz.iks.slp.debug=false&#13;&#10;-Dnet.slp.traceDATraffic=false&#13;&#10;-Dnet.slp.traceMsg=false&#13;&#10;-Dnet.slp.traceDrop=false&#13;&#10;-Dnet.slp.traceReg=false&#13;&#10;-Dnet.slp.failercount=3&#13;&#13;&#10;-Dnet.slp.multicastTimeouts=10,25,50,100,250,500,1000&#13;&#13;&#10;-Dnet.slp.multicastMaximumWait=2000"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime@default:true,org.eclipse.core.runtime.compatibility.registry@default:false,org.apache.commons.logging@default:default,org.eclipse.equinox.app@default:default,javax.servlet@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.util@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.common@default:true,org.eclipse.core.jobs@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.osgi@:"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.ecf.provider@default:default,org.eclipse.ecf.sharedobject@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ecf.provider.discovery@default:default,org.eclipse.ecf.examples.remoteservices.common@default:default,org.eclipse.ecf.discovery@default:default,org.eclipse.ecf@default:default,ch.ethz.iks.slp@default:default,org.eclipse.ecf.provider.jslp@default:default,org.eclipse.ecf.examples.remoteservices.server@default:default,org.eclipse.ecf.remoteservice@default:default,org.eclipse.ecf.provider.remoteservice@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.jmdns@default:default,org.eclipse.ecf.ssl@default:false"/>
-</launchConfiguration>
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/r-OSGi Remote EnvironmentInfo Server.launch b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/r-OSGi Remote EnvironmentInfo Server.launch
deleted file mode 100644
index c668433c4..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/r-OSGi Remote EnvironmentInfo Server.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/r-OSGi Remote EnvironmentInfo Server"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.ecf.examples.remoteservices.server.remoteServicesServer&#13;&#10;-serviceHostContainerType ecf.r_osgi.peer&#13;&#10;-serviceHostNamespace ecf.namespace.r_osgi&#13;&#10;-serviceHostID r-osgi://localhost:9278&#13;&#10;-clientContainerType ecf.r_osgi.peer&#13;&#10;-clientConnectTarget r-osgi://localhost:9278"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dnet.slp.port=65427&#13;&#10;-Dnet.mdns.port=65353"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.apache.commons.logging@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.core.resources.win32.x86*3.5.0.v20081020@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.help@default:default,org.eclipse.ui.workbench@default:default,com.ibm.icu@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.swt.win32.win32.x86*3.5.1.v3555a@default:false,org.eclipse.equinox.security.win32.x86*1.0.100.v20090520-1800@default:false,org.eclipse.ui.forms@default:default,org.eclipse.core.filesystem.win32.x86*1.1.0.v20080604-1400@default:false,org.eclipse.core.variables@default:default,org.eclipse.text@default:default,org.eclipse.core.runtime@default:true,org.eclipse.swt.win32.win32.x86*3.5.0.v3550a@default:false,org.eclipse.equinox.common@2:true,org.eclipse.equinox.registry@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.app@default:true,org.eclipse.ui.win32*3.2.100.v20090429-1800@default:false,org.objectweb.asm@default:default,org.eclipse.ui.win32*3.2.100.v20090429-1800@default:false,org.eclipse.ui@default:default,org.eclipse.core.filesystem.win32.x86*1.1.0.v20080604-1400@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.jface@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.resources.win32.x86*3.5.0.v20081020@default:false,org.eclipse.equinox.security.win32.x86*1.0.100.v20090520-1800@default:false,org.eclipse.swt@default:default,org.eclipse.osgi.util@default:default,javax.servlet@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.osgi,org.eclipse.core.jobs@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.ecf.provider.jmdns@default:true,org.eclipse.ecf.provider@default:default,org.eclipse.ecf.provider.remoteservice@default:default,org.eclipse.ecf.filetransfer@default:default,ch.ethz.iks.r_osgi.remote@default:default,org.eclipse.emf.common@default:default,org.eclipse.ecf.discovery.ui.edit@default:default,org.eclipse.ecf.remoteservice.ui@default:default,org.eclipse.ecf.discovery.ui.model@default:default,org.eclipse.ecf.discovery.ui@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.discovery.ui.properties@default:false,org.eclipse.ecf.examples.remoteservices.server@default:default,org.eclipse.ecf.sharedobject@default:default,org.eclipse.ecf.provider.discovery@default:true,org.eclipse.ecf.discovery.ui.properties.tabbed@default:false,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.ecf.remoteservice@default:default,org.eclipse.ecf.discovery@default:default,org.eclipse.ecf.examples.remoteservices.client@default:false,org.eclipse.emf.common.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.r_osgi@default:true,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.examples.remoteservices.common@default:default,org.eclipse.equinox.concurrent@default:default"/>
-</launchConfiguration>
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/plugin.xml b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/plugin.xml
deleted file mode 100644
index 1300a581d..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/plugin.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension id="remoteServicesServer" point="org.eclipse.core.runtime.applications">
- <application cardinality="*" thread="any" visible="true">
- <run class="org.eclipse.ecf.internal.examples.remoteservices.server.DiscoverableServer"/>
- </application>
- </extension>
-
-</plugin>
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java
deleted file mode 100644
index ec6d2968e..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.examples.remoteservices.server;
-
-import org.eclipse.ecf.discovery.IDiscoveryAdvertiser;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator implements BundleActivator {
-
- // The shared instance
- private static Activator plugin;
-
- private BundleContext context;
-
- private ServiceTracker environmentInfoTracker;
-
- private ServiceTracker discoveryTracker;
-
- private Filter filter;
-
- //private DiscoverableServer discoverableServer;
-
- /**
- * The constructor
- */
- public Activator() {
- // nothing
- }
-
- public EnvironmentInfo getEnvironmentInfo() {
- if (environmentInfoTracker == null) {
- environmentInfoTracker = new ServiceTracker(context, org.eclipse.osgi.service.environment.EnvironmentInfo.class.getName(), null);
- environmentInfoTracker.open();
- }
- return (EnvironmentInfo) environmentInfoTracker.getService();
- }
-
- public IDiscoveryAdvertiser getDiscoveryService(int waittime) throws InterruptedException {
- if (discoveryTracker == null) {
- discoveryTracker = new ServiceTracker(context, filter, null);
- discoveryTracker.open();
- }
- return (IDiscoveryAdvertiser) discoveryTracker.waitForService(waittime);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext ctxt) throws Exception {
- plugin = this;
- this.context = ctxt;
- filter = context.createFilter("(&(" + Constants.OBJECTCLASS + "=" + IDiscoveryAdvertiser.class.getName() + ")(" + IDiscoveryAdvertiser.CONTAINER_NAME + "=ecf.discovery.composite))"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // create and start discoverable server
- //discoverableServer = new DiscoverableServer();
- //String[] args = {};
- //discoverableServer.start(args);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext ctxt) throws Exception {
- plugin = null;
- if (environmentInfoTracker != null) {
- environmentInfoTracker.close();
- environmentInfoTracker = null;
- }
- if (discoveryTracker != null) {
- discoveryTracker.close();
- discoveryTracker = null;
- }
- this.context = null;
- //if (discoverableServer != null)
- // discoverableServer.stop();
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoverableServer.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoverableServer.java
deleted file mode 100644
index 57bfbba1b..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoverableServer.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.examples.remoteservices.server;
-
-import java.net.URI;
-import java.util.Properties;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.core.identity.*;
-import org.eclipse.ecf.discovery.*;
-import org.eclipse.ecf.discovery.identity.IServiceTypeID;
-import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
-import org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo;
-import org.eclipse.ecf.remoteservice.Constants;
-import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-/**
- *
- */
-public class DiscoverableServer implements IApplication {
-
- public static final String serviceHostContainerTypeArg = "-serviceHostContainerType"; //$NON-NLS-1$
- public static final String serviceHostNamespaceArg = "-serviceHostNamespace"; //$NON-NLS-1$
- public static final String serviceHostIDArg = "-serviceHostID"; //$NON-NLS-1$
- public static final String clientContainerTypeArg = "-clientContainerType"; //$NON-NLS-1$
- public static final String clientConnectTargetArg = "-clientConnectTarget"; //$NON-NLS-1$
- public static final String serviceTypeArg = "-serviceType"; //$NON-NLS-1$
-
- // Argument variables
- private String serviceHostContainerType = "ecf.generic.server"; //$NON-NLS-1$
- private String serviceHostNamespace = StringID.class.getName();
- private String serviceHostID = "ecftcp://localhost:3285/server"; //$NON-NLS-1$
- private String clientContainerType = "ecf.generic.client"; //$NON-NLS-1$
- private String clientConnectTarget = "ecftcp://localhost:3285/server"; //$NON-NLS-1$
- private String serviceType = "remotesvcs"; //$NON-NLS-1$
-
- private IContainer serviceHostContainer;
-
- private IServiceInfo serviceInfo;
-
- private IDiscoveryAdvertiser discoveryService;
-
- private boolean done = false;
-
- protected IContainer createServiceHostContainer() throws IDCreateException, ContainerCreateException {
- return ContainerFactory.getDefault().createContainer(serviceHostContainerType, IDFactory.getDefault().createID(serviceHostNamespace, serviceHostID));
- }
-
- protected Properties createServiceDiscoveryProperties() {
- Properties props = new Properties();
- props.put(Constants.SERVICE_CONTAINER_ID, serviceHostContainer.getID());
- props.put(Constants.SERVICE_CONTAINER_FACTORY_NAME, serviceHostContainerType);
- // Add auto registration of remote proxy
- props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true"); //$NON-NLS-1$
- return props;
- }
-
- public void start(String[] args) throws Exception {
- initializeFromArguments(args);
- // Create service host container
- serviceHostContainer = createServiceHostContainer();
- // Get adapter from serviceHostContainer
- final IRemoteServiceContainerAdapter containerAdapter = (IRemoteServiceContainerAdapter) serviceHostContainer.getAdapter(IRemoteServiceContainerAdapter.class);
- Assert.isNotNull(containerAdapter);
-
- final String serviceClassName = IRemoteEnvironmentInfo.class.getName();
-
- // register IRemoteEnvironmentInfo service
- // Then actually register the remote service implementation, with created props
- containerAdapter.registerRemoteService(new String[] {serviceClassName}, new RemoteEnvironmentInfoImpl(), createServiceDiscoveryProperties());
- System.out.println("Registered remote service " + serviceClassName + " with " + serviceHostContainer + ",ID=" + serviceHostContainer.getID()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- // then register for discovery
- discoveryService = Activator.getDefault().getDiscoveryService(15000);
-
- Assert.isNotNull(discoveryService);
-
- final String serviceName = System.getProperty("user.name") + System.currentTimeMillis(); //$NON-NLS-1$
- final IServiceTypeID serviceID = ServiceIDFactory.getDefault().createServiceTypeID(discoveryService.getServicesNamespace(), new String[] {serviceType});
- final Properties serviceProperties = createServicePropertiesForDiscovery(serviceClassName);
- URI uri = new URI(serviceHostID);
- serviceInfo = new ServiceInfo(uri, serviceName, serviceID, 0, 0, new ServiceProperties(serviceProperties));
- // register discovery here
- discoveryService.registerService(serviceInfo);
- System.out.println("service published for discovery\n\tserviceName=" + serviceName + "\n\tserviceTypeID=" + serviceID); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("\tserviceProperties=" + serviceProperties); //$NON-NLS-1$
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext ctxt) throws Exception {
- // Actually start with application args
- start((String[]) ctxt.getArguments().get("application.args")); //$NON-NLS-1$
- // wait on this thread until done
- synchronized (this) {
- while (!done) {
- wait();
- }
- }
- return new Integer(0);
- }
-
- protected Properties createServicePropertiesForDiscovery(String className) {
- return new DiscoveryProperties(className, clientContainerType, serviceHostNamespace, clientConnectTarget, null, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- if (serviceInfo != null) {
- if (discoveryService != null) {
- discoveryService.unregisterService(serviceInfo);
- serviceInfo = null;
- final IContainer container = (IContainer) discoveryService.getAdapter(IContainer.class);
- if (container != null) {
- container.disconnect();
- }
- discoveryService = null;
- }
- }
- if (serviceHostContainer != null) {
- serviceHostContainer.disconnect();
- serviceHostContainer = null;
- }
- synchronized (this) {
- done = true;
- notifyAll();
- }
-
- }
-
- private void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- if (args[i].equalsIgnoreCase(serviceHostContainerTypeArg))
- serviceHostContainerType = args[++i];
- else if (args[i].equalsIgnoreCase(serviceHostNamespaceArg))
- serviceHostNamespace = args[++i];
- else if (args[i].equalsIgnoreCase(serviceHostIDArg))
- serviceHostID = args[++i];
- else if (args[i].equalsIgnoreCase(clientContainerTypeArg))
- clientContainerType = args[++i];
- else if (args[i].equalsIgnoreCase(clientConnectTargetArg))
- clientConnectTarget = args[++i];
- else if (args[i].equalsIgnoreCase(serviceTypeArg))
- serviceType = args[++i];
- else {
- usage();
- throw new IllegalArgumentException("Invalid argument"); //$NON-NLS-1$
- }
- }
- }
-
- /**
- *
- */
- private void usage() {
- System.out.println("usage: eclipse -console [options] -application org.eclipse.ecf.examples.remoteservices.server.remoteServicesServer"); //$NON-NLS-1$
- System.out.println(" options: [" + serviceHostContainerTypeArg + " <typename>] default=ecf.generic.server"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" [" + serviceHostNamespaceArg + " <namespacename>] default=org.eclipse.ecf.identity.StringID"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" [" + serviceHostIDArg + " <hostID>] default=ecftcp://localhost:3285/server"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" [" + clientContainerTypeArg + " <typename>] default=ecf.generic.client"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" [" + clientConnectTargetArg + " <target>] default=ecftcp://localhost:3285/server"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(" [" + serviceTypeArg + " <serviceType>] default=remotesvcs"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoveryProperties.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoveryProperties.java
deleted file mode 100644
index b6871789c..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/DiscoveryProperties.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.ecf.internal.examples.remoteservices.server;
-
-import java.util.Properties;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.IContainer;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.remoteservice.Constants;
-
-public class DiscoveryProperties extends Properties {
-
- private static final long serialVersionUID = -6293580853756989675L;
-
- public DiscoveryProperties(String clazz, String containerFactory, IContainer container) {
- Assert.isNotNull(container);
- Assert.isNotNull(clazz);
- ID connectedID = container.getConnectedID();
- String connectNamespace = (connectedID == null) ? container.getConnectNamespace().getName() : connectedID.getNamespace().getName();
- String connectID = (connectedID == null) ? null : connectedID.getName();
- ID containerID = container.getID();
- String targetNamespace = (containerID == null) ? null : containerID.getNamespace().getName();
- String targetID = (containerID == null) ? null : containerID.getName();
- put(Constants.SERVICE_OBJECTCLASS, clazz);
- Assert.isNotNull(containerFactory);
- put(Constants.SERVICE_CONTAINER_FACTORY_NAME, containerFactory);
- if (connectNamespace != null)
- put(Constants.SERVICE_CONNECT_ID_NAMESPACE, connectNamespace);
- if (connectID != null)
- put(Constants.SERVICE_CONNECT_ID, connectID);
- if (targetNamespace != null)
- put(Constants.SERVICE_IDFILTER_NAMESPACE, targetNamespace);
- if (targetID != null)
- put(Constants.SERVICE_IDFILTER_ID, targetID);
- }
-
- public DiscoveryProperties(String clazz, String containerFactory, String connectNamespace, String connectID, String targetNamespace, String targetID) {
- Assert.isNotNull(clazz);
- put(Constants.SERVICE_OBJECTCLASS, clazz);
- Assert.isNotNull(containerFactory);
- put(Constants.SERVICE_CONTAINER_FACTORY_NAME, containerFactory);
- if (connectNamespace != null)
- put(Constants.SERVICE_CONNECT_ID_NAMESPACE, connectNamespace);
- if (connectID != null)
- put(Constants.SERVICE_CONNECT_ID, connectID);
- if (targetNamespace != null)
- put(Constants.SERVICE_IDFILTER_NAMESPACE, targetNamespace);
- if (targetID != null)
- put(Constants.SERVICE_IDFILTER_ID, targetID);
- }
-} \ No newline at end of file
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/RemoteEnvironmentInfoImpl.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/RemoteEnvironmentInfoImpl.java
deleted file mode 100644
index 7aa347c2e..000000000
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/RemoteEnvironmentInfoImpl.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.examples.remoteservices.server;
-
-import org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-/**
- *
- */
-public class RemoteEnvironmentInfoImpl implements IRemoteEnvironmentInfo {
-
- private EnvironmentInfo getEnvironmentInfo() {
- return Activator.getDefault().getEnvironmentInfo();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getCommandLineArgs()
- */
- public String[] getCommandLineArgs() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getCommandLineArgs()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getCommandLineArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getFrameworkArgs()
- */
- public String[] getFrameworkArgs() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getFrameworkArgs()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getFrameworkArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getNL()
- */
- public String getNL() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getNL()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getNL();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getNonFrameworkArgs()
- */
- public String[] getNonFrameworkArgs() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getNonFrameworkArgs()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getNonFrameworkArgs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getOS()
- */
- public String getOS() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getOS()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getOS();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getOSArch()
- */
- public String getOSArch() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getOSArch()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getOSArch();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getWS()
- */
- public String getWS() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("getWS()"); //$NON-NLS-1$
- return (ei == null) ? null : ei.getWS();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#inDebugMode()
- */
- public Boolean inDebugMode() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("inDebugMode()"); //$NON-NLS-1$
- return (ei == null) ? null : new Boolean(ei.inDebugMode());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#inDevelopmentMode()
- */
- public Boolean inDevelopmentMode() {
- final EnvironmentInfo ei = getEnvironmentInfo();
- System.out.println("inDevelopmentMode()"); //$NON-NLS-1$
- return (ei == null) ? null : new Boolean(ei.inDevelopmentMode());
- }
-
-}
diff --git a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.generic/.gitignore b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.generic/.gitignore
index e660fd93d..f3ffc3562 100644
--- a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.generic/.gitignore
+++ b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.generic/.gitignore
@@ -1 +1,2 @@
bin/
+/slewis.org.eclipse.ecf.tests.osgi.services.distribution.generic.launch
diff --git a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.r-osgi/.gitignore b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.r-osgi/.gitignore
index e660fd93d..0e2cc9a1e 100644
--- a/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.r-osgi/.gitignore
+++ b/tests/bundles/org.eclipse.ecf.tests.osgi.services.distribution.r-osgi/.gitignore
@@ -1 +1,2 @@
bin/
+/slewis.org.eclipse.ecf.tests.osgi.services.distribution.r-osgi.launch
diff --git a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/.gitignore b/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/.gitignore
index ba077a403..b5bfb2dc9 100755..100644
--- a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/.gitignore
+++ b/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/.gitignore
@@ -1 +1,2 @@
bin
+/slewis.org.eclipse.ecf.tests.remoteservice.generic.host.launch
diff --git a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/ServiceTrackerTest.java b/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/ServiceTrackerTest.java
deleted file mode 100755
index 565d3fa1a..000000000
--- a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/ServiceTrackerTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.tests.remoteservice.generic;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.eclipse.ecf.remoteservice.Constants;
-import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
-import org.eclipse.ecf.tests.remoteservice.AbstractServiceTrackerTest;
-import org.eclipse.ecf.tests.remoteservice.Activator;
-import org.eclipse.ecf.tests.remoteservice.IConcatService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- *
- */
-public class ServiceTrackerTest extends AbstractServiceTrackerTest {
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.tests.remoteservice.AbstractRemoteServiceTest#getClientContainerName()
- */
- protected String getClientContainerName() {
- return Generic.CONSUMER_CONTAINER_TYPE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- setClientCount(2);
- createServerAndClients();
- connectClients();
- setupRemoteServiceAdapters();
- addRemoteServiceListeners();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- cleanUpServerAndClients();
- super.tearDown();
- }
-
- public void testServiceTracker() throws Exception {
- final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
- // client [0]/adapter[0] is the service 'server'
- // client [1]/adapter[1] is the service target (client)
- final Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_REGISTRATION_TARGETS, getClients()[1].getConnectedID());
- props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true");
- // Register
- adapters[0].registerRemoteService(new String[] {IConcatService.class.getName()}, createService(), props);
- // Give some time for propagation
- sleep(3000);
-
- final ServiceTracker st = new ServiceTracker(Activator.getDefault().getContext(), IConcatService.class.getName(), null);
- assertNotNull(st);
- st.open();
- final IConcatService concatService = (IConcatService) st.getService();
- assertNotNull(concatService);
- System.out.println("proxy call start");
- final String result = concatService.concat("OSGi ", "is cool");
- System.out.println("proxy call end. result=" + result);
- sleep(3000);
- st.close();
- sleep(3000);
- }
-
- /*
- public void testRemoteServiceWithServiceTracker() throws Exception {
- final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
- // client [0]/adapter[0] is the service 'server'
- // client [1]/adapter[1] is the service target (client)
- final Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_REGISTRATION_TARGETS, getClients()[1].getConnectedID());
- props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true");
- // Register
- adapters[0].registerRemoteService(new String[] {IConcatService.class.getName()}, createService(), props);
- // Give some time for propagation
- sleep(3000);
-
- final ServiceTracker st = new ServiceTracker(Activator.getDefault().getContext(), IConcatService.class.getName(), null);
- assertNotNull(st);
- st.open();
- final ServiceReference ref = st.getServiceReference();
- assertNotNull(ref);
- final IRemoteService remoteService = (IRemoteService) ref.getProperty(Constants.REMOTE_SERVICE);
- assertNotNull(remoteService);
- // Call it asynch with listener
- remoteService.callAsynch(createRemoteConcat("OSGi ", "Sucks (sic)"), createRemoteCallListener());
-
- sleep(3000);
- st.close();
- }
- */
-}
diff --git a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/TransparentProxyTest.java b/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/TransparentProxyTest.java
deleted file mode 100755
index 247199721..000000000
--- a/tests/bundles/org.eclipse.ecf.tests.remoteservice.generic/src/org/eclipse/ecf/tests/remoteservice/generic/TransparentProxyTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.tests.remoteservice.generic;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.eclipse.ecf.remoteservice.Constants;
-import org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter;
-import org.eclipse.ecf.tests.remoteservice.AbstractRemoteServiceTest;
-import org.eclipse.ecf.tests.remoteservice.Activator;
-import org.eclipse.ecf.tests.remoteservice.IConcatService;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class TransparentProxyTest extends AbstractRemoteServiceTest {
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.tests.remoteservice.AbstractRemoteServiceTest#getClientContainerName()
- */
- protected String getClientContainerName() {
- return Generic.CONSUMER_CONTAINER_TYPE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- setClientCount(2);
- createServerAndClients();
- connectClients();
- setupRemoteServiceAdapters();
- addRemoteServiceListeners();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- cleanUpServerAndClients();
- super.tearDown();
- }
-
- public void testTransparentProxy() throws Exception {
- final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
- // client [0]/adapter[0] is the service 'server'
- // client [1]/adapter[1] is the service target (client)
- final Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_REGISTRATION_TARGETS, getClients()[1].getConnectedID());
- props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true");
- // Register
- adapters[0].registerRemoteService(new String[] {IConcatService.class.getName()}, createService(), props);
- // Give some time for propagation
- sleep(2000);
-
- final BundleContext bc = Activator.getDefault().getContext();
- assertNotNull(bc);
- final ServiceReference ref = bc.getServiceReference(IConcatService.class.getName());
- assertNotNull(ref);
- final IConcatService concatService = (IConcatService) bc.getService(ref);
- assertNotNull(concatService);
- System.out.println("proxy call start");
- final String result = concatService.concat("OSGi ", "is cool");
- System.out.println("proxy call end. result=" + result);
- bc.ungetService(ref);
- }
-
- /*
- public void testIRemoteService() throws Exception {
- final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
- // client [0]/adapter[0] is the service 'server'
- // client [1]/adapter[1] is the service target (client)
- final Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_REGISTRATION_TARGETS, getClients()[1].getConnectedID());
- props.put(Constants.AUTOREGISTER_REMOTE_PROXY, "true");
- // Register
- adapters[0].registerRemoteService(new String[] {IConcatService.class.getName()}, createService(), props);
- // Give some time for propagation
- sleep(3000);
-
- final BundleContext bc = Activator.getDefault().getContext();
- assertNotNull(bc);
- final ServiceReference ref = bc.getServiceReference(IConcatService.class.getName());
- assertNotNull(ref);
- final IRemoteService remoteService = (IRemoteService) ref.getProperty(Constants.REMOTE_SERVICE);
- assertNotNull(remoteService);
- // Call it asynch with listener
- remoteService.callAsynch(createRemoteConcat("OSGi ", "Sucks (sic)"), createRemoteCallListener());
- sleep(3000);
- }
- */
-}

Back to the top