HttpServiceTrackers¶
-
public class
HttpServiceTrackers
¶ This is responsible for creating and keeping track of
org.motechproject.osgi.web.HttpServiceTracker
instances.
Constructors¶
HttpServiceTrackers¶
-
public
HttpServiceTrackers
(BundleContext bundleContext)¶ Creates this http tracker registry and registers a bundle listener, that will close the trackers for a bundle once it is stopped.
Parameters: - bundleContext – the context used for registering the bundle listener
Methods¶
addTrackerFor¶
-
public HttpServiceTracker
addTrackerFor
(Bundle bundle)¶ Creates an
org.motechproject.osgi.web.HttpServiceTracker
instance for the given bundle.Parameters: - bundle – the bundle for which the tracker should be created
Returns: the newly created tracker
isBeingTracked¶
-
public boolean
isBeingTracked
(Bundle bundle)¶ Checks whether an
org.motechproject.osgi.web.HttpServiceTracker
exists for the given bundle.Parameters: - bundle – the bundle to check
Returns: true if a tracker exists, false otherwise
removeTrackerFor¶
-
public HttpServiceTracker
removeTrackerFor
(Bundle bundle)¶ Removes a tracker for a given bundle. The tracker is also unregistered and closed cleanly.
Parameters: - bundle – the bundle to remove the tracker for
Returns: the closed tracker instance, dropped from this registry