net.java.sip.communicator.util
Class ServiceUtils
java.lang.Object
net.java.sip.communicator.util.ServiceUtils
public class ServiceUtils
- extends Object
Gathers utility functions related to OSGi services such as getting a service
registered in a BundleContext.
- Author:
- Lubomir Marinov
|
Method Summary |
static
|
getService(org.osgi.framework.BundleContext bundleContext,
Class<T> serviceClass)
Gets an OSGi service registered in a specific BundleContext by
its Class |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getService
public static <T> T getService(org.osgi.framework.BundleContext bundleContext,
Class<T> serviceClass)
- Gets an OSGi service registered in a specific BundleContext by
its Class
- Type Parameters:
T - the very type of the OSGi service to get- Parameters:
bundleContext - the BundleContext in which the service to
get has been registeredserviceClass - the Class with which the service to get has
been registered in the bundleContext
- Returns:
- the OSGi service registered in bundleContext with the
specified serviceClass if such a service exists there;
otherwise, null
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.