C H A P T E R  3

OSGi Browser


3.1 Introduction

The OSGi Browser is a NetBeans module that supports connection to the device emulator or a real device that supports the OSGi framework. The browser displays the OSGi bundles available on the device and available information, such as properties. The browser can also manage bundles on the device.


3.2 OSGi Browser Window

OSGi Browser window displays nodes for devices and bundles. To see node properties, right-click on a node and select Properties from the context menu.

FIGURE 3-1 OSGi Browser Displaying Properties for a Bundle on a Real Device


OSGi browser with ProSyst Util Bundle properties shown


3.3 Browser Nodes

Context sensitive actions are available on the browser nodes.

3.3.1 Device Manager Node

The OSGi Browser requires ToolkitHome\bin\device-manager.exe to be running. If it is not running, you will see the message shown in FIGURE 3-2.

FIGURE 3-2 OSGi Browser When Device Manager is Not Running


Device Manager is not running message node

To start the device manager, right-click the node labeled Device Manager is not running and select Refresh from the context menu. A progress bar titled Refresh Devices runs in the bottom right of the NetBeans IDE. If the device manager is running, device nodes eventually appear in the browser window.

3.3.2 Device Node

If the device-manager is running you can see the emulator or a real device nodes in the browser window. A green icon means that the device is running, and a red icon means the device is stopped, as shown in FIGURE 3-3.

FIGURE 3-3 Disconnected Devices (Red) and Connected Device (Green)


Stopped Devices (Red) and Running Device (Green)

To connect a disconnected device, right-click on the device node and select Connect from the context menu. A progress bar titled Connecting to <deviceName> is shown while connecting.

To disconnect, quit the emulator or unplug the device.

3.3.3 Bundle Node

If the device is connected you can see installed bundles under the device node. The bundle icon varies depending on the bundle state. You can see the state description in the Properties window.

FIGURE 3-4 Bundles in Resolved and Active States


Bundles in Resolved and Active States

There are Start and Stop actions available on the bundle nodes. You can start bundles that are in the resolved state (DefaultColorPhone1 in FIGURE 3-4) and stop bundles which are in active state (Prosyst Metatype Bundle in FIGURE 3-4). System bundles (such as DB Bundle in FIGURE 3-4) cannot be stopped.

A Progress bar is shown while starting or stopping bundles.



Note - Do not stop the MIDletContainer bundle or the SDK Support Bundle bundle. If you stop these bundles the OSGi Browser is not be able to communicate with the device and its behavior is unpredictable.