3.6. Cooperation among Bundles and Services
We mentioned that bundles are insulated from each other because they have their own class loaders. However, bundles and their services also need to cooperate with one another to achieve some overall functionality. One practice is to build an application using bundles as the building blocks: Common operations are factored out and programmed into a set of basic modules; more sophisticated and high-level bundles then rely on the basic modules to get their work done.
For example, imagine that we want to develop a streaming audio service that may depend on, say, an HTTP service to make MP3 files available for remote players.[3] However it is not desirable to package the HTTP service into the streaming audio ...
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.