@ProviderType
public interface ContextAwareServiceResolver
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ContextAwareServiceResolver.ResolveAllResult<T extends ContextAwareService>
Result of the
resolveAll(Class, Adaptable) method. |
| Modifier and Type | Method and Description |
|---|---|
<T extends ContextAwareService> |
resolve(Class<T> serviceClass,
org.apache.sling.api.adapter.Adaptable adaptable)
Resolves the best-matching service implementation for the given resource context.
|
<T extends ContextAwareService> |
resolveAll(Class<T> serviceClass,
org.apache.sling.api.adapter.Adaptable adaptable)
Resolves all matching service implementations for the given resource context.
|
<T extends ContextAwareService> T resolve(Class<T> serviceClass, org.apache.sling.api.adapter.Adaptable adaptable)
ContextAwareService) are considered as candidates.
If multiple candidates exist the implementation with the highest service ranking is returned.T - Service interface or classserviceClass - Service interface or classadaptable - Adaptable which is either a Resource or SlingHttpServletRequest.
A resource instances is used directly for matching, in case of request the associated resource is used.
May be null if no context is available.<T extends ContextAwareService> ContextAwareServiceResolver.ResolveAllResult<T> resolveAll(Class<T> serviceClass, org.apache.sling.api.adapter.Adaptable adaptable)
ContextAwareService) are considered as candidates.
The candidates are returned ordered descending by their service ranking.T - Service interface or classserviceClass - Service interface or classadaptable - Adaptable which is either a Resource or SlingHttpServletRequest.
A resource instances is used directly for matching, in case of request the associated resource is used.
May be null if no context is available.Copyright © 2014–2017 wcm.io. All rights reserved.