Skip to content
This repository
Browse code

buglabs-osgi: ManagedRunnable interface API fix and refactoring.

  • Loading branch information...
commit 2bd7797992db5d10ae3f69f68580e9ceddf48253 1 parent 2495733
Ken Gilmer authored July 28, 2011
2  com.buglabs.app.bugdash2/com/buglabs/app/bugdash2/DashApplication.java
@@ -41,7 +41,7 @@ public DashApplication(BundleContext context) {
41 41
 	}
42 42
 
43 43
 	@Override
44  
-	public void run(Map<Object, Object> services) {
  44
+	public void run(Map<String, Object> services) {
45 45
 		LogManager.logInfo("BUGwebAdminServiceTracker: start");
46 46
 		service = (ISewingService) services.get(ISewingService.class.getName());
47 47
 		
2  com.buglabs.app.networkinggui/networkinggui/Activator.java
@@ -88,7 +88,7 @@ public void start(BundleContext ctx) throws Exception {
88 88
 		serviceTracker = ServiceTrackerUtil.openServiceTracker(context, new ServiceTrackerUtil.ManagedInlineRunnable() {
89 89
 			
90 90
 			@Override
91  
-			public void run(Map<Object, Object> services) {	
  91
+			public void run(Map<String, Object> services) {	
92 92
 				display = (IModuleDisplay) services.get(IModuleDisplay.class.getName());
93 93
 				networking = (INetworking) services.get(INetworking.class.getName());			
94 94
 				// Warning, this method will be called from within the same thread as the OSGi framework.  Long running operations should be avoided here.
2  com.buglabs.bug.base.bug20/com/buglabs/bug/base/Activator.java
@@ -302,7 +302,7 @@ public void buttonEvent(ButtonEvent event) {
302 302
 	}
303 303
 
304 304
 	@Override
305  
-	public void run(Map<Object, Object> services) {
  305
+	public void run(Map<String, Object> services) {
306 306
 		this.httpService = (HttpService) services.get(HttpService.class.getName());
307 307
 
308 308
 		try {
2  com.buglabs.bug.dragonfly/com/buglabs/bug/dragonfly/Activator.java
@@ -188,7 +188,7 @@ public void serviceChanged(ServiceEvent event) {
188 188
 	/* (non-Javadoc)
189 189
 	 * @see com.buglabs.util.osgi.ServiceTrackerUtil.ManagedRunnable#run(java.util.Map)
190 190
 	 */
191  
-	public void run(Map<Object, Object> services) {
  191
+	public void run(Map<String, Object> services) {
192 192
 		httpService = (HttpService) services.get(HttpService.class.getName());
193 193
 
194 194
 		try {
2  com.buglabs.bug.ws/com/buglabs/bug/ws/Activator.java
@@ -109,7 +109,7 @@ public void stop(BundleContext bundleContext) throws Exception {
109 109
 	}
110 110
 
111 111
 	@Override
112  
-	public void run(Map<Object, Object> services) {
  112
+	public void run(Map<String, Object> services) {
113 113
 		// Determine if object state is valid
114 114
 		if (servlets != null) {
115 115
 			log.log(LogService.LOG_ERROR
3  com.buglabs.common/com/buglabs/util/osgi/ServiceTrackerUtil.java
@@ -29,6 +29,7 @@
29 29
 
30 30
 import java.util.Arrays;
31 31
 import java.util.Dictionary;
  32
+import java.util.HashMap;
32 33
 import java.util.Hashtable;
33 34
 import java.util.Map;
34 35
 
@@ -104,7 +105,7 @@ public ServiceTrackerUtil(BundleContext context, ManagedRunnable runnable, int s
104 105
 		this.bc = context;
105 106
 		this.runnable = runnable;
106 107
 		this.serviceCount = serviceCount;
107  
-		this.serviceMap = new Hashtable<String, Object>();
  108
+		this.serviceMap = new HashMap<String, Object>();
108 109
 		this.runCalled = false;
109 110
 		this.shutdownCalled = false;
110 111
 
2  com.buglabs.osgi.sewing/com/buglabs/osgi/sewing/Activator.java
@@ -78,7 +78,7 @@ public void stop(BundleContext context) throws Exception {
78 78
 	}
79 79
 
80 80
 	@Override
81  
-	public void run(Map<Object, Object> services) {
  81
+	public void run(Map<String, Object> services) {
82 82
 		httpService = (HttpService) services.get(HttpService.class.getName());
83 83
 		sewingRegistration = context.registerService(ISewingService.class.getName(), new SewingServiceImpl(httpService), null);
84 84
 	}

0 notes on commit 2bd7797

Please sign in to comment.
Something went wrong with that request. Please try again.