public final class SPIServiceUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
getAllService(Class<T> serviceType) |
static <T> List<T> |
getOrLoadSortedService(Class<T> serviceType) |
static <T> T |
getPriorityHighestService(Class<T> serviceType) |
static <T> Collection<T> |
getPriorityHighestServices(Function<T,String> keyFunc,
Class<T> serviceType) |
static <T> List<T> |
getSortedService(Class<T> serviceType) |
static <T> T |
getTargetService(Class<T> serviceType)
get target service.if target services are array,only random access to a service.
|
static <T,IMPL> IMPL |
getTargetService(Class<T> serviceType,
Class<IMPL> implType) |
static <T> List<T> |
loadSortedService(Class<T> serviceType)
no cache, return new instances every time.
|
public static <T> List<T> loadSortedService(Class<T> serviceType)
public static <T> T getTargetService(Class<T> serviceType)
public static <T> T getPriorityHighestService(Class<T> serviceType)
public static <T> Collection<T> getPriorityHighestServices(Function<T,String> keyFunc, Class<T> serviceType)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.