Registry / utility / org-osgi-util-tracker

org-osgi-util-tracker

JSON →
library1.5.4javamavenunverified

Provides utility classes for tracking OSGi services and service references.

<dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.util.tracker</artifactId> <version>1.5.4</version> </dependency>
INSTALL
IMPORT
SIG · ORG-OSGI-UTIL-TRAC
O
org-osgi-util-tracker
utilityjavav1.5.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ServiceTracker
✓ org.osgi.util.tracker.ServiceTracker

Creates and opens a ServiceTracker to track an OSGi service.

import org.osgi.util.tracker.ServiceTracker; import org.osgi.framework.BundleContext; public class Example { public void trackService(BundleContext context) { ServiceTracker<?, ?> tracker = new ServiceTracker<>(context, "com.example.MyService", null); tracker.open(); Object service = tracker.getService(); System.out.println("Tracked service: " + service); } }
Debug
Known issues
gotchaServiceTracker must be properly closed to avoid resource leaks.
fix
Call tracker.close() when the tracker is no longer needed.
affects: all
Upgrade
Version history
1.5.4latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
org-osgi-util-tracker — mvn dependency:get org-osgi-util-tracker · libregistry