Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-05-19 04:44:16 +0000
committerslewis2010-05-19 04:44:16 +0000
commitf692232fd6202d57fd5aea1f260dde99f13dee70 (patch)
tree2f27a548a83b24f02fb5c08904a812fa05a53fdf /examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host
parenta0d108937e8cc74e882f4dcdab0650d172e6034b (diff)
downloadorg.eclipse.ecf-f692232fd6202d57fd5aea1f260dde99f13dee70.tar.gz
org.eclipse.ecf-f692232fd6202d57fd5aea1f260dde99f13dee70.tar.xz
org.eclipse.ecf-f692232fd6202d57fd5aea1f260dde99f13dee70.zip
Added product config for zookeeper,generic host and consumer. Also cleaned up code
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host')
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.classpath2
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.jdt.core.prefs13
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF5
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties3
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (zookeeper,generic).product67
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommand.java82
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommandProvider.java41
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java125
8 files changed, 196 insertions, 142 deletions
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.classpath b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.classpath
index 6f3b481ac..64c5e31b7 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.classpath
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.jdt.core.prefs b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.jdt.core.prefs
index 0990e3f90..451aec775 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,10 @@
-#Mon Oct 12 11:13:42 PDT 2009
+#Tue May 18 21:06:21 PDT 2010
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -12,7 +13,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -66,4 +67,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF
index 11e5b3678..0f2874e4e 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF
@@ -5,8 +5,9 @@ Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.hello.host;singleto
Bundle-Version: 2.0.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.examples.remoteservices.hello.host.Activator
Bundle-Vendor: %bundleProvider
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
Import-Package: org.eclipse.ecf.core;version="3.0.0",
org.eclipse.ecf.core.identity;version="3.0.0",
org.eclipse.ecf.examples.remoteservices.hello,
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties
index 8015ab317..5bd94f200 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties
@@ -5,8 +5,7 @@ bin.includes = META-INF/,\
about.html,\
bundle.properties,\
plugin.xml,\
- products/,\
- OSGI-INF/
+ products/
src.includes = about.html,\
bundle.properties,\
products/
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (zookeeper,generic).product b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (zookeeper,generic).product
new file mode 100644
index 000000000..1d4b4edfa
--- /dev/null
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (zookeeper,generic).product
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="Generic Zookeeper Hello Host" uid="org.eclipse.ecf.examples.remoteservices.genericzookeeperhellohost" application="org.eclipse.ecf.examples.remoteservices.hello.host.HelloHost" version="1.0.0" useFeatures="false" includeLaunchers="false">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-console
+-consoleLog
+-containerType ecf.generic.server
+-containerId ecftcp://localhost:5782/server</programArgs>
+ <vmArgs>-Dzoodiscovery.dataDir=zookeeperdata2
+-Dzoodiscovery.clientPort=2001
+-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=localhost:2002
+-Xms40m
+-Xmx512m</vmArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="org.apache.log4j"/>
+ <plugin id="org.apache.zookeeper"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.ecf"/>
+ <plugin id="org.eclipse.ecf.discovery"/>
+ <plugin id="org.eclipse.ecf.examples.remoteservices.hello"/>
+ <plugin id="org.eclipse.ecf.examples.remoteservices.hello.host"/>
+ <plugin id="org.eclipse.ecf.identity"/>
+ <plugin id="org.eclipse.ecf.osgi.services.discovery"/>
+ <plugin id="org.eclipse.ecf.osgi.services.distribution"/>
+ <plugin id="org.eclipse.ecf.provider"/>
+ <plugin id="org.eclipse.ecf.provider.remoteservice"/>
+ <plugin id="org.eclipse.ecf.provider.zookeeper"/>
+ <plugin id="org.eclipse.ecf.remoteservice"/>
+ <plugin id="org.eclipse.ecf.sharedobject"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.concurrent"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.ecf.examples.remoteservices.hello.host" autoStart="true" startLevel="0" />
+ <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+ <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
+ </configurations>
+
+</product>
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommand.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommand.java
deleted file mode 100644
index b0ee37e14..000000000
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommand.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c)2010 REMAIN B.V. (http://www.remainsoftware.com).
- * 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:
- * Wim Jongman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ecf.internal.examples.remoteservices.hello.host;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-// referenced in component.xml
-public class HelloCommand implements CommandProvider {
-
- private ServiceRegistration helloRegistration;
- private String containerType;
- private String containerId;
- private BundleContext context;
-
- public HelloCommand(BundleContext context,
- ServiceRegistration helloRegistration, String containerType,
- String containerId) {
- this.context = context;
- this.helloRegistration = helloRegistration;
- this.containerType = containerType;
- this.containerId = containerId;
-
- Dictionary props = new Hashtable();
- props.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(
- Integer.MAX_VALUE - 100));
-
- context.registerService(CommandProvider.class.getName(), this, props);
- }
-
- public void _hello(CommandInterpreter ci) {
- String arg = ci.nextArgument();
-
- if (arg == null) {
- return;
- }
-
- if (arg.equalsIgnoreCase("stop")) {
- stopService();
- }
- if (arg.equalsIgnoreCase("start")) {
- startService();
- }
- }
-
- private void startService() {
- if (helloRegistration == null) {
- helloRegistration = HelloHostApplication.startService(context,
- containerType, containerId);
- System.out.println("Service started");
- }
- }
-
- private void stopService() {
- if (helloRegistration != null) {
- helloRegistration = HelloHostApplication
- .stopService(helloRegistration);
- System.out.println("Service stopped");
- }
- }
-
- public String getHelp() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("---ECF Example Command---\n");
- buffer.append("\thello stop - stop the service. It should be undiscovered remote\n");
- buffer.append("\thello start - start the service. It should be discovered remote\n");
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommandProvider.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommandProvider.java
new file mode 100644
index 000000000..4acb36407
--- /dev/null
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloCommandProvider.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c)2010 REMAIN B.V. (http://www.remainsoftware.com).
+ * 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:
+ * Wim Jongman - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ecf.internal.examples.remoteservices.hello.host;
+
+import org.eclipse.osgi.framework.console.CommandInterpreter;
+import org.eclipse.osgi.framework.console.CommandProvider;
+
+// referenced in component.xml
+public class HelloCommandProvider implements CommandProvider {
+
+ private HelloHostApplication helloApplication;
+
+ public HelloCommandProvider(HelloHostApplication app) {
+ this.helloApplication = app;
+ }
+
+ public void _hello(CommandInterpreter ci) {
+ String arg = ci.nextArgument();
+ if (arg == null) {
+ return;
+ }
+ if (arg.equalsIgnoreCase("stop")) helloApplication.unregisterHelloRemoteService();
+ if (arg.equalsIgnoreCase("start")) helloApplication.registerHelloRemoteService();
+ }
+
+ public String getHelp() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("---ECF Hello Remote Service Example Command---\n");
+ buffer.append("\thello stop - stop the remote hello service. It should be undiscovered remote\n");
+ buffer.append("\thello start - start the remote hello service. It should be discovered remote\n");
+ return buffer.toString();
+ }
+} \ No newline at end of file
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
index 696ebeb59..f0a5861e1 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
@@ -10,6 +10,8 @@
*****************************************************************************/
package org.eclipse.ecf.internal.examples.remoteservices.hello.host;
+import java.util.Dictionary;
+import java.util.Hashtable;
import java.util.Properties;
import org.eclipse.ecf.examples.remoteservices.hello.IHello;
@@ -21,6 +23,7 @@ import org.eclipse.ecf.osgi.services.distribution.IHostDistributionListener;
import org.eclipse.ecf.osgi.services.distribution.LoggingHostDistributionListener;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.osgi.framework.console.CommandProvider;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
@@ -39,78 +42,68 @@ public class HelloHostApplication implements IApplication,
private boolean done = false;
private ServiceRegistration helloRegistration;
- //private ServiceRegistration helloRegistration2;
+ private ServiceRegistration discoveryListenerRegistration;
+ private ServiceRegistration distributionListenerRegistration;
public Object start(IApplicationContext appContext) throws Exception {
-
bundleContext = Activator.getContext();
-
-
// Process Arguments
processArgs(appContext);
-
- // Register host discovery listener to log the publish/unpublish of remote services.
- // This LoggingHostDiscoveryListener logs the publication of OSGi remote services...so
- // that the discovery can be more easily debugged.
- // Note that other IHostDiscoveryListener may be created and registered, and
- // all will be notified of publish/unpublish events
- bundleContext.registerService(IHostDiscoveryListener.class.getName(), new LoggingHostDiscoveryListener(), null);
-
- // Register host distribution listener to log the register/unregister of remote services.
- // This LoggingHostDistributionListener logs the register/unregister of OSGi remote services...so
- // that the distribution can be more easily debugged.
- // Note that other IHostDistributionListener may be created and registered, and
- // all will be notified of register/unregister events
- bundleContext.registerService(IHostDistributionListener.class.getName(), new LoggingHostDistributionListener(), null);
-
- helloRegistration = startService(bundleContext, containerType, containerId);
-
- // Register the console command
- new HelloCommand(bundleContext, helloRegistration, containerType, containerId);
-
+ // Register osgi discovery and distribution listeners
+ registerRemoteServiceListeners();
+ // Finally, register the actual remote service
+ registerHelloRemoteService();
+ // Register console provider. This adds 'start' and 'stop' commands to
+ // the OSGI console
+ // so that the hello remote service can be started/stopped
+ registerConsoleProvider();
// wait until stopped
waitForDone();
-
return IApplication.EXIT_OK;
}
- public static ServiceRegistration startService(BundleContext bundleContext, String containerType, String containerId) {
- // Setup properties for remote service distribution, as per OSGi 4.2 remote services
+ void registerHelloRemoteService() {
+ // Setup properties for remote service distribution, as per OSGi 4.2
+ // remote services
// specification (chap 13 in compendium spec)
Properties props = new Properties();
- // add OSGi service property indicated export of all interfaces exposed by service (wildcard)
- props.put(IDistributionConstants.SERVICE_EXPORTED_INTERFACES, IDistributionConstants.SERVICE_EXPORTED_INTERFACES_WILDCARD);
+ // add OSGi service property indicated export of all interfaces exposed
+ // by service (wildcard)
+ props.put(IDistributionConstants.SERVICE_EXPORTED_INTERFACES,
+ IDistributionConstants.SERVICE_EXPORTED_INTERFACES_WILDCARD);
// add OSGi service property specifying config
- props.put(IDistributionConstants.SERVICE_EXPORTED_CONFIGS, containerType);
+ props.put(IDistributionConstants.SERVICE_EXPORTED_CONFIGS,
+ containerType);
// add ECF service property specifying container factory args
- props.put(IDistributionConstants.SERVICE_EXPORTED_CONTAINER_FACTORY_ARGUMENTS, containerId);
+ props.put(
+ IDistributionConstants.SERVICE_EXPORTED_CONTAINER_FACTORY_ARGUMENTS,
+ containerId);
// register remote service
- ServiceRegistration reg = bundleContext.registerService(IHello.class
- .getName(), new Hello(), props);
+ helloRegistration = bundleContext.registerService(
+ IHello.class.getName(), new Hello(), props);
// tell everyone
System.out.println("Host: Hello Service Registered");
-
- return reg;
}
- public static ServiceRegistration stopService(ServiceRegistration helloRegistration)
- {
- helloRegistration.unregister();
-
- // tell everyone
- System.out.println("Host: Hello Service Unregistered");
-
- return null;
- }
- public void stop() {
+ void unregisterHelloRemoteService() {
if (helloRegistration != null) {
helloRegistration.unregister();
helloRegistration = null;
}
-// if (helloRegistration2 != null) {
-// helloRegistration2.unregister();
-// helloRegistration2 = null;
-// }
+ // tell everyone
+ System.out.println("Host: Hello Remote Service Unregistered");
+ }
+
+ public void stop() {
+ unregisterHelloRemoteService();
+ if (discoveryListenerRegistration != null) {
+ discoveryListenerRegistration.unregister();
+ discoveryListenerRegistration = null;
+ }
+ if (distributionListenerRegistration != null) {
+ distributionListenerRegistration.unregister();
+ distributionListenerRegistration = null;
+ }
bundleContext = null;
synchronized (appLock) {
done = true;
@@ -118,6 +111,40 @@ public class HelloHostApplication implements IApplication,
}
}
+ private void registerConsoleProvider() {
+ // Register the console hello start/stop command provider
+ HelloCommandProvider helloCommandProvider = new HelloCommandProvider(this);
+ Dictionary props = new Hashtable();
+ props.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(
+ Integer.MAX_VALUE - 100));
+ bundleContext.registerService(CommandProvider.class.getName(),
+ helloCommandProvider, props);
+ }
+
+ private void registerRemoteServiceListeners() {
+ // Register host discovery listener to log the publish/unpublish of
+ // remote services.
+ // This LoggingHostDiscoveryListener logs the publication of OSGi remote
+ // services...so
+ // that the discovery can be more easily debugged.
+ // Note that other IHostDiscoveryListener may be created and registered,
+ // and
+ // all will be notified of publish/unpublish events
+ discoveryListenerRegistration = bundleContext.registerService(IHostDiscoveryListener.class.getName(),
+ new LoggingHostDiscoveryListener(), null);
+ // Register host distribution listener to log the register/unregister of
+ // remote services.
+ // This LoggingHostDistributionListener logs the register/unregister of
+ // OSGi remote services...so
+ // that the distribution can be more easily debugged.
+ // Note that other IHostDistributionListener may be created and
+ // registered, and
+ // all will be notified of register/unregister events
+ distributionListenerRegistration = bundleContext.registerService(
+ IHostDistributionListener.class.getName(),
+ new LoggingHostDistributionListener(), null);
+ }
+
private void processArgs(IApplicationContext appContext) {
String[] originalArgs = (String[]) appContext.getArguments().get(
"application.args");

Back to the top