|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.utils.service.ServiceUtils
public final class ServiceUtils
The Class ServiceHelper.
| Method Summary | ||
|---|---|---|
static void |
checkIsServiceBound(java.lang.Object service,
java.lang.Class<?> type,
java.lang.String message)
Check the given service== null and in case throws an exception. |
|
static
|
getService(BundleContext context,
java.lang.Class<T> clazz)
Gets the service with default wait delay. |
|
static
|
getService(BundleContext context,
java.lang.Class<T> clazz,
long timeout)
Uses a ServiceTracker to get the given DeclarativeService. |
|
static
|
getService(BundleContext context,
ServiceReference reference,
java.lang.Class<T> clazz)
resolve a service reference. |
|
static
|
getService(java.lang.Class<T> clazz)
Gets the service with default wait delay using the BundleContext of UtilsActivator. |
|
static
|
getService(java.lang.Class<T> clazz,
long timeout)
Gets the service with the given wait delay using the BundleContext of UtilsActivator. |
|
static
|
getService(ServiceReference reference,
java.lang.Class<T> clazz)
resolve a service reference. |
|
static ServiceReference[] |
getServiceReferences(BundleContext context,
java.lang.String clazz)
Uses a ServiceTracker to get the service references. |
|
static ServiceReference[] |
getServiceReferences(java.lang.Class<?> clazz)
Uses a ServiceTracker to get the service references. |
|
static ServiceReference[] |
getServiceReferences(java.lang.String clazz)
Uses a ServiceTracker to get the service references. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T getService(BundleContext context,
java.lang.Class<T> clazz,
long timeout)
throws java.lang.InterruptedException
T - expected service classclazz - the service class of the DeclarativeService interfacetimeout - the number of milliseconds to wait for the ServiceTracker to find the servicecontext - the context
java.lang.InterruptedException - a InterruptedException
public static <T> T getService(BundleContext context,
java.lang.Class<T> clazz)
throws java.lang.InterruptedException
T - expected service classclazz - the clazzcontext - the context
java.lang.InterruptedException - the interrupted exception
public static <T> T getService(java.lang.Class<T> clazz,
long timeout)
throws java.lang.InterruptedException
T - expected service classclazz - the clazztimeout - the number of milliseconds to wait for the ServiceTracker to find the service
java.lang.InterruptedException - the interrupted exception
public static <T> T getService(java.lang.Class<T> clazz)
throws java.lang.InterruptedException
T - expected service classclazz - the clazz
java.lang.InterruptedException - the interrupted exception
public static ServiceReference[] getServiceReferences(BundleContext context,
java.lang.String clazz)
clazz - the class name of the DeclarativeService interfacecontext - the context
public static ServiceReference[] getServiceReferences(java.lang.String clazz)
clazz - the class name of the DeclarativeService interface
public static ServiceReference[] getServiceReferences(java.lang.Class<?> clazz)
clazz - the class of the DeclarativeService interface
public static <T> T getService(BundleContext context,
ServiceReference reference,
java.lang.Class<T> clazz)
T - expected service classcontext - the contextreference - the referenceclazz - expected service class
public static <T> T getService(ServiceReference reference,
java.lang.Class<T> clazz)
T - expected service classreference - the referenceclazz - expected service class
public static void checkIsServiceBound(java.lang.Object service,
java.lang.Class<?> type,
java.lang.String message)
service - the servicetype - the typemessage - the message
ServiceNotBoundException - the service not bound exception
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||