BundleContext

Syntax

public interface BundleContext

Description

Bundle's execution context. Represents the execution context of a bundle within the framework. The context provides methods which allow the bundle to interact with the framework.

The provided methods allow a bundle to:

  • Subscribe to the events published by the framework.

  • Register services in the framework's service registry.

  • Retrieve references to service from the framework's service registry.

  • Get and release the service objects for a referenced service.

  • Install new bundles into the framework.

  • Get the list of installed bundles.

  • Get the Bundle object for a bundle.

  • Create File objects for files in a persistent storage area provided for the bundle by the framework.

A BundleContext object ...

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.