Skip to content

BUG OSGi API 3.0 Refactoring Summary

barberdt edited this page Aug 16, 2011 · 5 revisions

Migrate

HTTP Service

There are some long standing defects with our existing http server implementation. Since we're running on OpenJDK now, let's throw in the towel and use Jetty.

com.buglabs.osgi.http -> org.apache.felix.http.jetty

AppUI

Since we ship this w/ the rootfs, it will move from bugnet into git. The package namespace will change:

appui -> com.buglabs.bug.appui

IModuleControl and friends

BUG Dragonfly API and code support is being isolated to the com.buglsbs.bug.dragonfly module. This means that for classes such as IModuleControl the package namespace has changed:

com.buglabs.module -> com.buglabs.bug.dragonfly.module

Pull-apart

IShellSession and friends

In order to facilitate easier porting to other hardware platforms, non HW specific functionality should be removed from com.buglabs.bug.base.molly.

bundle: com.buglabs.bug.base.molly
package: com.buglabs.bug.base.pub
classes: IShellService, IShellSession, ICommandResponseHandler

Are moved to:

bundle: com.buglabs.util.shell
package: com.buglabs.util.shell.pub

com.buglabs.util.XmlNode and friends

The xml utilities will move to package namespace: com.buglabs.util.xml

com.buglabs.util.simplerestclient.*

The HTTP client will move to package namespace: com.buglabs.util.wsclient

com.buglabs.util.LogServiceUtil and other OSGi-related helper classes

The OSGi static helper classes move to package namespace: com.buglabs.util.osgi

Bring-together

A lot of duplicated code can be removed if all of BUG web services are put into one bundle. There is little value in having separate bundles.

com.buglabs.bug.service
com.buglabs.bug.program
com.buglabs.bug.module

merged to become

com.buglabs.bug.ws

Remove

All PhoneME-isms

  • StringUtil
  • non-generics
  • old for loops
  • array handling
  • The old BUG13 APIs
  • Menu
  • bug13 buttons
  • AbstractServiceTracker (Class will still be available, but internal code will not use it.)

Rename

com.buglabs.nema -> com.buglabs.util.nmea
com.buglabs.bug.event -> com.buglabs.bug.dragonfly
com.buglabs.application -> com.buglabs.osgi.util

ServiceTrackerHelper -> ServiceTrackerUtil

This class and it's helper classes was in com.buglabs.application, now it lives in com.buglabs.util.osgi. The method signatures have changed so that Java's varargs feature can be used to easily specify an arbitrary list of services in the method.

Add