public class SServiceProvider
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SServiceProvider.IntermediateProxyResultListener<T> |
static class |
SServiceProvider.ProxyResultListener<T> |
Modifier and Type | Field and Description |
---|---|
static java.util.Map |
methodreferences
The reference method cache (method -> boolean[] (is reference)).
|
Constructor and Description |
---|
SServiceProvider() |
Modifier and Type | Method and Description |
---|---|
protected static void |
checkComponent(IInternalAccess component)
Check access not null and throw exception otherwise.
|
protected static void |
checkThreadAccess(IInternalAccess component,
boolean proxy)
Check thread access and throw exception if is not component thread.
|
protected static <T> java.util.Collection<T> |
createRequiredProxies(IInternalAccess component,
java.util.Collection<T> sers,
java.lang.Class<?> type)
Create a required service proxies.
|
protected static <T> T |
createRequiredProxy(IInternalAccess component,
T ser,
java.lang.Class<?> type)
Create a required service proxy.
|
protected static IFuture<java.lang.Void> |
ensureThreadAccess(IInternalAccess component,
boolean proxy)
Check access not null and throw exception otherwise.
|
static <T> IFuture<T> |
getDeclaredService(IExternalAccess provider,
java.lang.Class<T> type)
Get all declared services of the given provider.
|
static <T> IFuture<T> |
getDeclaredService(IInternalAccess component,
java.lang.Class<T> type)
Get all declared services of the given provider.
|
static <T> IFuture<T> |
getDeclaredService(IInternalAccess component,
java.lang.Class<T> type,
boolean proxy)
Get all declared services of the given provider.
|
static IIntermediateFuture<IService> |
getDeclaredServices(IExternalAccess provider)
Get all declared services of the given provider.
|
static IIntermediateFuture<IService> |
getDeclaredServices(IInternalAccess component)
Get all declared services of the given provider.
|
static IIntermediateFuture<IService> |
getDeclaredServices(IInternalAccess component,
boolean proxy)
Get all declared services of the given provider.
|
static boolean[] |
getLocalReferenceInfo(java.lang.reflect.Method method,
boolean refdef)
Get the copy info for method parameters.
|
static <T> T |
getLocalService(IComponentIdentifier component,
java.lang.Class<T> type)
Get one service of a type.
|
static <T> T |
getLocalService(IComponentIdentifier component,
java.lang.Class<T> type,
java.lang.String scope)
Get one service of a type.
|
static <T> T |
getLocalService(IComponentIdentifier component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
boolean proxy)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
IComponentIdentifier target)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
IComponentIdentifier target,
boolean proxy)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
boolean proxy)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter)
Get one service of a type.
|
static <T> T |
getLocalService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter,
boolean proxy)
Get one service of a type.
|
static <T> T |
getLocalService0(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter,
boolean proxy)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type,
boolean proxy)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
boolean proxy)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter)
Get one service of a type.
|
static <T> java.util.Collection<T> |
getLocalServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IFilter<T> filter,
boolean proxy)
Get one service of a type.
|
static boolean[] |
getReferenceInfo(java.lang.reflect.Method method,
boolean refdef,
boolean local)
Get the copy info for method parameters.
|
static boolean[] |
getRemoteReferenceInfo(java.lang.reflect.Method method,
boolean refdef)
Get the copy info for method parameters.
|
static <T> IFuture<T> |
getService(IExternalAccess provider,
java.lang.Class<T> type)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IExternalAccess provider,
java.lang.Class<T> type,
java.lang.String scope)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IExternalAccess provider,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IExternalAccess provider,
IComponentIdentifier cid,
java.lang.Class<T> type)
Get a service from a specific component.
|
static <T> IFuture<T> |
getService(IExternalAccess provider,
IServiceIdentifier sid)
Get one service with id.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type,
boolean proxy)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
boolean proxy)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter,
boolean proxy)
Get one service of a type.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
IComponentIdentifier cid,
java.lang.Class<T> type)
Get a service from a specific component.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
IComponentIdentifier cid,
java.lang.Class<T> type,
boolean proxy)
Get a service from a specific component.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
IServiceIdentifier sid)
Get one service with id.
|
static <T> IFuture<T> |
getService(IInternalAccess component,
IServiceIdentifier sid,
boolean proxy)
Get one service with id.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IExternalAccess provider,
java.lang.Class<T> type)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IExternalAccess provider,
java.lang.Class<T> type,
java.lang.String scope)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IExternalAccess provider,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type,
boolean proxy)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
boolean proxy)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter)
Get all services of a type.
|
static <T> ITerminableIntermediateFuture<T> |
getServices(IInternalAccess component,
java.lang.Class<T> type,
java.lang.String scope,
IAsyncFilter<T> filter,
boolean proxy)
Get all services of a type.
|
static boolean |
isReturnValueLocalReference(java.lang.reflect.Method method,
boolean refdef)
Test if return value is local reference.
|
static boolean |
isReturnValueRemoteReference(java.lang.reflect.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,java.lang.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 java.util.Map methodreferences
public static <T> T getLocalService(IComponentIdentifier component, java.lang.Class<T> type)
type
- The class.public static <T> T getLocalService(IComponentIdentifier component, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> T getLocalService(IComponentIdentifier component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter)
component
- The internal access.type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, IComponentIdentifier target)
component
- The internal access.type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type)
type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, boolean proxy)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, boolean proxy)
type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter, boolean proxy)
component
- The internal access.type
- The class.public static <T> T getLocalService0(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter, boolean proxy)
component
- The internal access.type
- The class.public static <T> T getLocalService(IInternalAccess component, java.lang.Class<T> type, IComponentIdentifier target, boolean proxy)
component
- The internal access.type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type, boolean proxy)
type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, boolean proxy)
type
- The class.public static <T> java.util.Collection<T> getLocalServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IFilter<T> filter, boolean proxy)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, IServiceIdentifier sid)
clazz
- The class.public static <T> IFuture<T> getService(IInternalAccess component, IComponentIdentifier cid, java.lang.Class<T> type)
component
- The component.cid
- The target component identifier.type
- The service type.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter)
type
- The class.public static <T> IFuture<T> getDeclaredService(IInternalAccess component, java.lang.Class<T> type)
public static IIntermediateFuture<IService> getDeclaredServices(IInternalAccess component)
public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type, boolean proxy)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, boolean proxy)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter, boolean proxy)
type
- The class.public static <T> IFuture<T> getService(IInternalAccess component, IServiceIdentifier sid, boolean proxy)
clazz
- The class.public static <T> IFuture<T> getService(IInternalAccess component, IComponentIdentifier cid, java.lang.Class<T> type, boolean proxy)
component
- The component.cid
- The target component identifier.type
- The service type.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type, boolean proxy)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, boolean proxy)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter, boolean proxy)
type
- The class.public static <T> IFuture<T> getDeclaredService(IInternalAccess component, java.lang.Class<T> type, boolean proxy)
public static IIntermediateFuture<IService> getDeclaredServices(IInternalAccess component, boolean proxy)
public static <T> IFuture<T> getService(IExternalAccess provider, java.lang.Class<T> type)
type
- The class.public static <T> IFuture<T> getService(IExternalAccess provider, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> IFuture<T> getService(IExternalAccess provider, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter)
type
- The class.public static <T> IFuture<T> getService(IExternalAccess provider, IServiceIdentifier sid)
clazz
- The class.public static <T> IFuture<T> getService(IExternalAccess provider, IComponentIdentifier cid, java.lang.Class<T> type)
provider
- A service provider.cid
- The target component identifier.type
- The service type.public static <T> ITerminableIntermediateFuture<T> getServices(IExternalAccess provider, java.lang.Class<T> type)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IExternalAccess provider, java.lang.Class<T> type, java.lang.String scope)
type
- The class.public static <T> ITerminableIntermediateFuture<T> getServices(IExternalAccess provider, java.lang.Class<T> type, java.lang.String scope, IAsyncFilter<T> filter)
type
- The class.public static <T> IFuture<T> getDeclaredService(IExternalAccess provider, java.lang.Class<T> type)
public static IIntermediateFuture<IService> getDeclaredServices(IExternalAccess provider)
public static <S> ITerminableIntermediateFuture<S> rankServices(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public static <S> ITerminableIntermediateFuture<Tuple2<S,java.lang.Double>> rankServicesWithScores(ITerminableIntermediateFuture<S> searchfut, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public static boolean[] getLocalReferenceInfo(java.lang.reflect.Method method, boolean refdef)
public static boolean[] getRemoteReferenceInfo(java.lang.reflect.Method method, boolean refdef)
public static boolean[] getReferenceInfo(java.lang.reflect.Method method, boolean refdef, boolean local)
public static boolean isReturnValueLocalReference(java.lang.reflect.Method method, boolean refdef)
public static boolean isReturnValueRemoteReference(java.lang.reflect.Method method, boolean refdef)
protected static <T> T createRequiredProxy(IInternalAccess component, T ser, java.lang.Class<?> type)
protected static <T> java.util.Collection<T> createRequiredProxies(IInternalAccess component, java.util.Collection<T> sers, java.lang.Class<?> type)
protected static void checkThreadAccess(IInternalAccess component, boolean proxy)
protected static void checkComponent(IInternalAccess component)
protected static IFuture<java.lang.Void> ensureThreadAccess(IInternalAccess component, boolean proxy)