| C H A P T E R 3 |
|
OSGi Browser |
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.
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
Context sensitive actions are available on the browser nodes.
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
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.
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)
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.
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
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.
Copyright © 2007, Sun Microsystems, Inc. All Rights Reserved.