Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-10-17 03:47:49 +0000
committerslewis2009-10-17 03:47:49 +0000
commit4104d84661a1051c9887f4e628bbb012555afdff (patch)
treebdafa28b8f4c7a016d8cc32b62edc9aaa23cc378 /examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host
parent914feec83bb1cb70f519602c5378d613dc8ae17b (diff)
downloadorg.eclipse.ecf-4104d84661a1051c9887f4e628bbb012555afdff.tar.gz
org.eclipse.ecf-4104d84661a1051c9887f4e628bbb012555afdff.tar.xz
org.eclipse.ecf-4104d84661a1051c9887f4e628bbb012555afdff.zip
Simplification/generalization of code and addition of activemq product. Also moved product configuration files to products directory
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host')
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/META-INF/MANIFEST.MF4
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/build.properties8
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/plugin.xml17
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (activemq).product61
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (generic).product (renamed from examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (generic).product)11
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (r-osgi).product (renamed from examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (r-osgi).product)23
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/Activator.java67
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java119
9 files changed, 250 insertions, 64 deletions
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.pde.core.prefs b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.pde.core.prefs
index 48dfe4fb4..63acf3895 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.pde.core.prefs
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/.settings/org.eclipse.pde.core.prefs
@@ -1,4 +1,4 @@
-#Wed May 27 17:33:17 PDT 2009
+#Fri Oct 16 19:45:41 PDT 2009
eclipse.preferences.version=1
-pluginProject.extensions=false
+pluginProject.extensions=true
resolve.requirebundle=false
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 9dbd4c1f2..42dff59b0 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
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.hello.host
+Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.hello.host;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.examples.remoteservices.hello.host.Activator
Bundle-Vendor: %bundleProvider
@@ -12,8 +12,10 @@ Import-Package: org.eclipse.ecf.core;version="3.0.0",
org.eclipse.ecf.examples.remoteservices.hello,
org.eclipse.ecf.examples.remoteservices.hello.impl,
org.eclipse.ecf.osgi.services.distribution;version="1.0.0",
+ org.eclipse.equinox.app;version="1.0.0",
org.osgi.framework,
org.osgi.util.tracker;version="1.4.2"
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
Bundle-Localization: bundle
+Export-Package: org.eclipse.ecf.internal.examples.remoteservices.hello.host;x-internal:=true
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 05515c5cf..81a148111 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
@@ -3,9 +3,11 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
about.html,\
- bundle.properties
+ bundle.properties,\
+ plugin.xml
src.includes = about.html,\
bundle.properties,\
META-INF/,\
- Hello Service Host (r-osgi).product,\
- Hello Service Host (generic).product
+ products/,\
+ src/,\
+ plugin.xml
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/plugin.xml b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/plugin.xml
new file mode 100644
index 000000000..8136c9612
--- /dev/null
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ id="HelloHost"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ cardinality="singleton-global"
+ thread="main"
+ visible="true">
+ <run
+ class="org.eclipse.ecf.internal.examples.remoteservices.hello.host.HelloHostApplication">
+ </run>
+ </application>
+ </extension>
+
+</plugin>
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (activemq).product b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (activemq).product
new file mode 100644
index 000000000..db6c086ca
--- /dev/null
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (activemq).product
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="ActiveMQ Hello Host" uid="org.eclipse.ecf.examples.remoteservices.activemqhellohost" application="org.eclipse.ecf.examples.remoteservices.hello.host.HelloHost" version="1.0.0" useFeatures="false" includeLaunchers="false">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-containerType ecf.jms.activemq.tcp.manager
+-containerId tcp://localhost:61616/exampleTopic</programArgs>
+ <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+ </launcherArgs>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="ch.ethz.iks.slp"/>
+ <plugin id="javax.servlet"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.ecf"/>
+ <plugin id="org.eclipse.ecf.datashare"/>
+ <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"/>
+ <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.datashare"/>
+ <plugin id="org.eclipse.ecf.provider.jmdns"/>
+ <plugin id="org.eclipse.ecf.provider.jms"/>
+ <plugin id="org.eclipse.ecf.provider.jms.activemq"/>
+ <plugin id="org.eclipse.ecf.provider.jslp"/>
+ <plugin id="org.eclipse.ecf.provider.remoteservice"/>
+ <plugin id="org.eclipse.ecf.remoteservice"/>
+ <plugin id="org.eclipse.ecf.sharedobject"/>
+ <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+ <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>
+
+
+</product>
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (generic).product b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (generic).product
index a0030e1a8..e7703c0b6 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (generic).product
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (generic).product
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product application="org.eclipse.ui.ide.workbench" useFeatures="false" includeLaunchers="false">
+<product name="Generic Hello Host" uid="org.eclipse.ecf.examples.remoteservices.generichellohost" application="org.eclipse.ecf.examples.remoteservices.hello.host.HelloHost" version="1.0.0" useFeatures="false" includeLaunchers="false">
<configIni use="default">
</configIni>
<launcherArgs>
- <programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console</programArgs>
- <vmArgs>-Declipse.ignoreApp=true -Dosgi.noShutdown=true
--DcontainerType=ecf.generic.server</vmArgs>
+ <programArgs>-containerType ecf.generic.server
+-containerId ecftcp://localhost:3787/server</programArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
@@ -25,7 +24,9 @@
<plugins>
<plugin id="javax.servlet"/>
+ <plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
<plugin id="org.eclipse.ecf"/>
<plugin id="org.eclipse.ecf.discovery"/>
@@ -41,8 +42,10 @@
<plugin id="org.eclipse.ecf.remoteservice"/>
<plugin id="org.eclipse.ecf.sharedobject"/>
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+ <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"/>
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (r-osgi).product b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (r-osgi).product
index df22982d4..c392c4f52 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/Hello Service Host (r-osgi).product
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/products/Hello Service Host (r-osgi).product
@@ -1,22 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product application="org.eclipse.ui.ide.workbench" useFeatures="false" includeLaunchers="false">
+<product name="R-OSGI Hello Host" uid="org.eclipse.ecf.examples.remoteservices.rosgihellohost" application="org.eclipse.ecf.examples.remoteservices.hello.host.HelloHost" version="1.0.0" useFeatures="false" includeLaunchers="false">
<configIni use="default">
</configIni>
<launcherArgs>
- <programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console</programArgs>
- <vmArgs>-Declipse.ignoreApp=true -Dosgi.noShutdown=true</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
<plugins>
<plugin id="ch.ethz.iks.r_osgi.remote"/>
<plugin id="ch.ethz.iks.slp"/>
<plugin id="javax.servlet"/>
+ <plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
<plugin id="org.eclipse.ecf"/>
<plugin id="org.eclipse.ecf.discovery"/>
@@ -33,18 +43,15 @@
<plugin id="org.eclipse.ecf.remoteservice"/>
<plugin id="org.eclipse.ecf.sharedobject"/>
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+ <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"/>
<plugin id="org.objectweb.asm"/>
</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/Activator.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/Activator.java
index ac572697c..803031d6e 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/Activator.java
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/Activator.java
@@ -8,67 +8,42 @@
* Contributors:
* Composent, Inc. - initial API and implementation
*****************************************************************************/
+/****************************************************************************
+ * Copyright (c) 2009 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.hello.host;
-import java.util.Properties;
-
-import org.eclipse.ecf.core.IContainerManager;
-import org.eclipse.ecf.examples.remoteservices.hello.IHello;
-import org.eclipse.ecf.examples.remoteservices.hello.impl.Hello;
-import org.eclipse.ecf.osgi.services.distribution.IDistributionConstants;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.util.tracker.ServiceTracker;
+public class Activator implements BundleActivator {
-public class Activator implements BundleActivator, IDistributionConstants {
+ private static BundleContext context;
- private String containerType = System.getProperty("containerType","ecf.r_osgi.peer");
- private BundleContext context;
- private ServiceTracker containerManagerServiceTracker;
- private ServiceRegistration helloRegistration;
-
/*
* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
+ * )
*/
- public void start(BundleContext context) throws Exception {
- this.context = context;
- // Create R-OSGi Container
- IContainerManager containerManager = getContainerManagerService();
- containerManager.getContainerFactory().createContainer(containerType);
-
- Properties props = new Properties();
- // add OSGi service property indicating this
- props.put(REMOTE_INTERFACES, REMOTE_INTERFACES_WILDCARD);
- // register remote service
- helloRegistration = context.registerService(IHello.class.getName(), new Hello(), props);
- System.out.println("Host: Hello Service Registered");
+ public void start(BundleContext ctxt) throws Exception {
+ context = ctxt;
}
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
public void stop(BundleContext context) throws Exception {
- if (helloRegistration != null) {
- helloRegistration.unregister();
- helloRegistration = null;
- }
- if (containerManagerServiceTracker != null) {
- containerManagerServiceTracker.close();
- containerManagerServiceTracker = null;
- }
- this.context = null;
+ context = null;
}
- private IContainerManager getContainerManagerService() {
- if (containerManagerServiceTracker == null) {
- containerManagerServiceTracker = new ServiceTracker(context, IContainerManager.class.getName(),null);
- containerManagerServiceTracker.open();
- }
- return (IContainerManager) containerManagerServiceTracker.getService();
+ public static BundleContext getContext() {
+ return context;
}
}
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
new file mode 100644
index 000000000..e12938a85
--- /dev/null
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
@@ -0,0 +1,119 @@
+/****************************************************************************
+ * Copyright (c) 2009 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.hello.host;
+
+import java.util.Properties;
+
+import org.eclipse.ecf.core.IContainerManager;
+import org.eclipse.ecf.examples.remoteservices.hello.IHello;
+import org.eclipse.ecf.examples.remoteservices.hello.impl.Hello;
+import org.eclipse.ecf.osgi.services.distribution.IDistributionConstants;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class HelloHostApplication implements IApplication,
+ IDistributionConstants {
+
+ private static final String DEFAULT_CONTAINER_TYPE = "ecf.r_osgi.peer";
+ public static final String DEFAULT_CONTAINER_ID = null;
+
+ private BundleContext bundleContext;
+ private ServiceTracker containerManagerServiceTracker;
+
+ private String containerType = DEFAULT_CONTAINER_TYPE;
+ private String containerId = DEFAULT_CONTAINER_ID;
+
+ private final Object appLock = new Object();
+ private boolean done = false;
+
+ private ServiceRegistration helloRegistration;
+
+ public Object start(IApplicationContext appContext) throws Exception {
+ bundleContext = Activator.getContext();
+ // Process Arguments
+ processArgs(appContext);
+ // Create Container of desired type
+ IContainerManager containerManager = getContainerManagerService();
+ if (containerId == null || "".equals(containerId))
+ containerManager.getContainerFactory().createContainer(
+ containerType);
+ else
+ containerManager.getContainerFactory().createContainer(
+ containerType, new Object[] { containerId });
+
+ Properties props = new Properties();
+ // add OSGi service property indicating this
+ props.put(REMOTE_INTERFACES, REMOTE_INTERFACES_WILDCARD);
+ // register remote service
+ helloRegistration = bundleContext.registerService(IHello.class
+ .getName(), new Hello(), props);
+ System.out.println("Host: Hello Service Registered");
+
+ // wait until stopped
+ waitForDone();
+
+ return IApplication.EXIT_OK;
+ }
+
+ public void stop() {
+ if (helloRegistration != null) {
+ helloRegistration.unregister();
+ helloRegistration = null;
+ }
+ if (containerManagerServiceTracker != null) {
+ containerManagerServiceTracker.close();
+ containerManagerServiceTracker = null;
+ }
+ bundleContext = null;
+ }
+
+ private IContainerManager getContainerManagerService() {
+ if (containerManagerServiceTracker == null) {
+ containerManagerServiceTracker = new ServiceTracker(bundleContext,
+ IContainerManager.class.getName(), null);
+ containerManagerServiceTracker.open();
+ }
+ return (IContainerManager) containerManagerServiceTracker.getService();
+ }
+
+ private void processArgs(IApplicationContext appContext) {
+ String[] originalArgs = (String[]) appContext.getArguments().get(
+ "application.args");
+ if (originalArgs == null)
+ return;
+ for (int i = 0; i < originalArgs.length; i++) {
+ if (originalArgs[i].equals("-containerType")) {
+ containerType = originalArgs[i + 1];
+ i++;
+ } else if (originalArgs[i].equals("-containerId")) {
+ containerId = originalArgs[i + 1];
+ i++;
+ }
+ }
+ }
+
+ private void waitForDone() {
+ // then just wait here
+ synchronized (appLock) {
+ while (!done) {
+ try {
+ appLock.wait();
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+ }
+ }
+ }
+
+}

Back to the top