Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorafinkbein2010-01-13 16:29:43 +0000
committerafinkbein2010-01-13 16:29:43 +0000
commitda891590e7bd6142565e0158a92d63d868feda5e (patch)
treedb85a47fad97518041f4a24a6cf0785ccc0920b0
parent857dd6882fc4948e571011e8df12bd6a1fa5f18a (diff)
downloadorg.eclipse.osee-da891590e7bd6142565e0158a92d63d868feda5e.tar.gz
org.eclipse.osee-da891590e7bd6142565e0158a92d63d868feda5e.tar.xz
org.eclipse.osee-da891590e7bd6142565e0158a92d63d868feda5e.zip
"Team Workflow" - 0RQMW - "Make OSEE application services use the messenger gateway"
-rw-r--r--org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/future/OseeMessagingListener.java20
-rw-r--r--org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/Activator.java54
2 files changed, 40 insertions, 34 deletions
diff --git a/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/future/OseeMessagingListener.java b/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/future/OseeMessagingListener.java
deleted file mode 100644
index c547933bf97..00000000000
--- a/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/future/OseeMessagingListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * 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:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.messaging.future;
-
-import java.util.Properties;
-
-/**
- * @author Andrew M. Finkbeiner
- */
-public interface OseeMessagingListener {
- public void process(Properties message);
-}
diff --git a/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/Activator.java b/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/Activator.java
index 20e14910f07..28ba78ef3b8 100644
--- a/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/Activator.java
+++ b/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/Activator.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.messaging.internal;
+import java.util.Hashtable;
+
import org.eclipse.osee.framework.messaging.MessagingGateway;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -19,22 +21,46 @@ import org.osgi.framework.ServiceRegistration;
* @author Andrew M. Finkbeiner
*/
public class Activator implements BundleActivator {
+ private static Activator me;
+ private BundleContext context;
+ private OseeMessagingImplService oseeMessaging;
+
+ // old
+ private ServiceRegistration registration;
+ private MessagingGatewayImpl messaging;
- private ServiceRegistration registration;
- private MessagingGatewayImpl messaging;
+ public void start(BundleContext context) throws Exception {
+ this.context = context;
+ me = this;
+ oseeMessaging = new OseeMessagingImplService(context);
+ oseeMessaging.start();
- public void start(BundleContext context) throws Exception {
- messaging = new MessagingGatewayImpl();
- registration = context.registerService(MessagingGateway.class.getName(), messaging, null);
- }
+ //old
+ messaging = new MessagingGatewayImpl();
+ registration = context.registerService(
+ MessagingGateway.class.getName(), messaging, new Hashtable());
+ }
- public void stop(BundleContext context) throws Exception {
- if (registration != null) {
- registration.unregister();
- }
+ public void stop(BundleContext context) throws Exception {
+ oseeMessaging.stop();
+ me = null;
+ this.context = null;
+
+ //old
+ if (registration != null) {
+ registration.unregister();
+ }
- if (messaging != null) {
- messaging.dispose();
- }
- }
+ if (messaging != null) {
+ messaging.dispose();
+ }
+ }
+
+ public static Activator getInstance() {
+ return me;
+ }
+
+ public BundleContext getContext(){
+ return context;
+ }
}

Back to the top