public interface ServicesBroker
ServicesBroker servicesBroker =SpecialistBroker
.requireSpecialist(ServicesBroker.TYPE)
; MyService myService = servicesBroker.getService(MyService.class)
;
Modifier and Type | Field and Description |
---|---|
static SpecialistType<ServicesBroker> |
TYPE
An agent providing means to broker services of a specific type.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getService(Class<T> serviceClass)
Returns a service instance as requested by a given class.
|
static final SpecialistType<ServicesBroker> TYPE
@NotNull <T> T getService(Class<T> serviceClass) throws ServiceNotFoundException
T
- The Java type of the service.serviceClass
- The class of the service to look up.ServiceNotFoundException
- If no appropriate service was found.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408