public class SServiceProvider extends Object
Modifier and Type | Field and Description |
---|---|
static Map |
methodreferences
The reference method cache (method -> boolean[] (is reference)).
|
Constructor and Description |
---|
SServiceProvider() |
Modifier and Type | Method and Description |
---|---|
static <T> IFuture<T> |
getDeclaredService(IServiceProvider provider,
Class<T> type)
Get all declared services of the given provider.
|
static IIntermediateFuture<IService> |
getDeclaredServices(IServiceProvider provider)
Get all declared services of the given provider.
|
static boolean[] |
getLocalReferenceInfo(Method method,
boolean refdef)
Get the copy info for method parameters.
|
static <T> T |
getLocalService(IServiceProvider provider,
Class<T> type)
Get one service of a type.
|
static <T> T |
getLocalService(IServiceProvider provider,
Class<T> type,
IComponentIdentifier target)
Get one service of a type.
|
static <T> T |
getLocalService(IServiceProvider provider,
Class<T> type,
String scope)
Get one service of a type.
|
static <T> T |
getLocalService(IServiceProvider provider,
Class<T> type,
String scope,
IFilter<T> filter)
Get one service of a type.
|
static <T> Collection<T> |
getLocalServices(IServiceProvider provider,
Class<T> type)
Get one service of a type.
|
static <T> Collection<T> |
getLocalServices(IServiceProvider provider,
Class<T> type,
String scope)
Get one service of a type.
|
static <T> Collection<T> |
getLocalServices(IServiceProvider provider,
Class<T> type,
String scope,
IFilter<T> filter)
Get one service of a type.
|
static boolean[] |
getReferenceInfo(Method method,
boolean refdef,
boolean local)
Get the copy info for method parameters.
|
static boolean[] |
getRemoteReferenceInfo(Method method,
boolean refdef)
Get the copy info for method parameters.
|
static <T> IFuture<T> |
getService(IServiceProvider provider,
Class<T> type)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IServiceProvider provider,
Class<T> type,
String scope)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IServiceProvider provider,
Class<T> type,
String scope,
IRemoteFilter<T> filter)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IServiceProvider provider,
IComponentIdentifier cid,
Class<T> type)
Get a service from a specific component.
|
static <T> IFuture<T> |
getService(IServiceProvider provider,
IServiceIdentifier sid)
Get one service with id.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IServiceProvider provider,
Class<T> type)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IServiceProvider provider,
Class<T> type,
String scope)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IServiceProvider provider,
Class<T> type,
String scope,
IRemoteFilter<T> filter)
Get all services of a type.
|
static <T> IFuture<T> |
getServiceUpwards(IServiceProvider provider,
Class<T> type)
Get one service of a type and only search upwards (parents).
|
static boolean |
isReturnValueLocalReference(Method method,
boolean refdef)
Test if return value is local reference.
|
static boolean |
isReturnValueRemoteReference(Method method,
boolean refdef)
Get the copy info for method parameters.
|
static <S> ITerminableIntermediateFuture<S> |
rankServices(ITerminableIntermediateFuture<S> searchfut,
IServiceRanker<S> ranker,
IRankingSearchTerminationDecider<S> decider)
Rank the services of a search with a specific ranker.
|
static <S> ITerminableIntermediateFuture<Tuple2<S,Double>> |
rankServicesWithScores(ITerminableIntermediateFuture<S> searchfut,
IServiceRanker<S> ranker,
IRankingSearchTerminationDecider<S> decider)
Rank the services of a search with a specific ranker and emit the scores.
|
public static final Map methodreferences
public static <T> T getLocalService(IServiceProvider provider, Class<T> type)
type
- The class.public static <T> T getLocalService(IServiceProvider provider, Class<T> type, String scope)
type
- The class.public static <T> T getLocalService(IServiceProvider provider, Class<T> type, String scope, IFilter<T> filter)
type
- The class.public static <T> T getLocalService(IServiceProvider provider, Class<T> type, IComponentIdentifier target)
type
- The class.public static <T> Collection<T> getLocalServices(IServiceProvider provider, Class<T> type)
type
- The class.public static <T> Collection<T> getLocalServices(IServiceProvider provider, Class<T> type, String scope)
type
- The class.public static <T> Collection<T> getLocalServices(IServiceProvider provider, Class<T> type, String scope, IFilter<T> filter)
type
- The class.public static <T> IFuture<T> getService(IServiceProvider provider, Class<T> type)
type
- The class.public static <T> IFuture<T> getService(IServiceProvider provider, Class<T> type, String scope)
type
- The class.public static <T> IFuture<T> getService(IServiceProvider provider, Class<T> type, String scope, IRemoteFilter<T> filter)
type
- The class.public static <T> IFuture<T> getService(IServiceProvider provider, IServiceIdentifier sid)
clazz
- The class.public static <T> IFuture<T> getService(IServiceProvider provider, IComponentIdentifier cid, Class<T> type)
provider
- A service provider.cid
- The target component identifier.type
- The service type.public static <T> ITerminableIntermediateFuture<T> getServices(IServiceProvider provider, Class<T> type)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IServiceProvider provider, Class<T> type, String scope)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IServiceProvider provider, Class<T> type, String scope, IRemoteFilter<T> filter)
type
- The class.public static <T> IFuture<T> getServiceUpwards(IServiceProvider provider, Class<T> type)
type
- The class.public static <T> IFuture<T> getDeclaredService(IServiceProvider provider, Class<T> type)
public static IIntermediateFuture<IService> getDeclaredServices(IServiceProvider provider)
public static <S> ITerminableIntermediateFuture<S> rankServices(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public static <S> ITerminableIntermediateFuture<Tuple2<S,Double>> rankServicesWithScores(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public static boolean[] getLocalReferenceInfo(Method method, boolean refdef)
public static boolean[] getRemoteReferenceInfo(Method method, boolean refdef)
public static boolean[] getReferenceInfo(Method method, boolean refdef, boolean local)
public static boolean isReturnValueLocalReference(Method method, boolean refdef)
public static boolean isReturnValueRemoteReference(Method method, boolean refdef)
Copyright © 2015. All Rights Reserved.