public final class DefaultServiceContext extends Object implements ServiceContext
ServiceContext interface and hereby uses the JDK
ServiceLoader to load the services required.| Constructor and Description |
|---|
DefaultServiceContext() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getPriority(Object o)
Checks the given instance for a @Priority annotation.
|
<T> Optional<T> |
getService(Class<T> serviceType) |
<T> List<T> |
getServices(Class<T> serviceType)
Loads and registers services.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInstance, ordinalpublic <T> Optional<T> getService(Class<T> serviceType)
getService in interface ServiceContextpublic <T> List<T> getServices(Class<T> serviceType)
getServices in interface ServiceContextT - the concrete type.serviceType - The service type.null.public static int getPriority(Object o)
o - the instance, not null.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.