Registry /
utility / com-liferay-osgi-service-tracker-collections
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.
ServiceTrackerMap
✓ com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMap
Track OSGi services using ServiceTrackerMap
import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMap;
import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMapFactory;
import org.osgi.framework.BundleContext;
public class TrackerExample {
public void track(BundleContext context) {
ServiceTrackerMap<String, Object> map = ServiceTrackerMapFactory.openSingleValueMap(
context, Object.class, "some.property");
Object service = map.getService("key");
}
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.