Class and Description |
com.softwareag.applatform.sdk.ServiceUtil A helper class that provides utility methods when working with OSGi services. Use this class to look up registered services. |
Method Name | Return Type | Method Arguments | Description |
getService | T | ServletContext servletCtxClass<T> serviceCls | Returns the instance of the OSGi service of type serviceCls from the specified ServletContext. This method looks for an instance of BundleContext in the ServletContext under the attribute name osgi-bundlecontext and use the obtained BundleContext to look up the service. |
getService | T | Class<T> serviceClsBundleContext bundleCtx | Gets the OSGi service of given serviceCls type using the given BundleContext. If no service of the serviceCls type is registered, this method returns a null value. |
getBundleContext | BundleContext | Class<?> bundleCls | Gets the BundleContext from the bundle containing the given class. If there is no BundleContext specified, this method returns a null value. |
getService | T | Class<T> serviceCls | Gets the OSGi service for the given service class type. If no service of the specified type is registered, this method returns a null value. |