8.5. Putting It Together

In this section we give a comprehensive example showing how the standard services we have covered so far can be used together. We develop a bundle that registers a servlet with the HTTP service and allows you to configure the serial ports through a Web interface as shown in Figure 8.6.

Figure 8.6. A Web interface for configuring the serial port

The servlet looks up the framework service registry for instances of SerialServices. It then presents the parameters—baud rate, data bits, stop bits, and parity—for each SerialService's serial port in an HTML form. A user can select different settings using the pull-down menu and ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.