public class ObjectPoolHelper extends Object
| Constructor and Description |
|---|
ObjectPoolHelper() |
| Modifier and Type | Method and Description |
|---|---|
static ServiceRegistration<?> |
registerObjectPool(BundleContext context,
ObjectPool<?> pool,
String poolClass)
Register the object pool with the OSGi service bus
|
static <S> ServiceRegistration<?> |
registerObjectPool(BundleContext context,
ObjectPool<S> pool,
Class<? extends S> poolClass)
Register the object pool with the OSGi service bus
|
public static ServiceRegistration<?> registerObjectPool(BundleContext context, ObjectPool<?> pool, String poolClass)
The caller must ensure that the service is unregistered using the service registration object returned.
context - the context used for registeringpool - the pool to registerpoolClass - the service class provided by this poolpublic static <S> ServiceRegistration<?> registerObjectPool(BundleContext context, ObjectPool<S> pool, Class<? extends S> poolClass)
This method actually calls
registerObjectPool(BundleContext, ObjectPool, String) with
Class.getName() from poolClass.
context - the context used for registeringpool - the pool to registerpoolClass - the service class provided by this pool