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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.