Package com.tangosol.util
Class ResourceResolverHelper
java.lang.Object
com.tangosol.util.ResourceResolverHelper
Provides helpful methods for working with
ResourceResolver
s.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.11.13
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceResolver
resourceResolverFrom
(MapBuilder.Dependencies dependencies) Constructs and configures aResourceResolver
from aMapBuilder
dependencies.static ResourceResolver
resourceResolverFrom
(ParameterResolver parameterResolver, ParameterResolver resolverForExpressionEvaluation) Constructs aResourceResolver
based on aParameterResolver
.static ResourceResolver
resourceResolverFrom
(ResourceResolver... resourceResolvers) Constructs aResourceResolver
based on a sequence of specifiedResourceResolver
s.static <T> ResourceResolver
resourceResolverFrom
(Class<T> clsResolvableResource, String sResolvableResourceName, T resolveableResource) Constructs aResourceResolver
for a single named resource.static <T> ResourceResolver
resourceResolverFrom
(Class<T> clsResolvableResource, T resolveableResource) Constructs aResourceResolver
for a single resource.
-
Constructor Details
-
Method Details
-
resourceResolverFrom
Constructs and configures aResourceResolver
from aMapBuilder
dependencies.When a
ConfigurableCacheFactory
is available in the dependencies, theResourceRegistry
is returns as the second part of aChainedResourceResolver
.- Parameters:
dependencies
- theMapBuilder
dependencies- Returns:
- a
ResourceResolver
-
resourceResolverFrom
public static ResourceResolver resourceResolverFrom(ParameterResolver parameterResolver, ParameterResolver resolverForExpressionEvaluation) Constructs aResourceResolver
based on aParameterResolver
.- Parameters:
parameterResolver
- theParameterResolver
to adapt into aResourceResolver
resolverForExpressionEvaluation
- theParameterResolver
to use for evaluatingParameter
s- Returns:
- a
ResourceResolver
-
resourceResolverFrom
Constructs aResourceResolver
based on a sequence of specifiedResourceResolver
s.- Parameters:
resourceResolvers
- theResourceResolver
s- Returns:
- a
ResourceResolver
-
resourceResolverFrom
public static <T> ResourceResolver resourceResolverFrom(Class<T> clsResolvableResource, String sResolvableResourceName, T resolveableResource) Constructs aResourceResolver
for a single named resource.- Parameters:
clsResolvableResource
- theClass
of the resourcesResolvableResourceName
- the name of the resourceresolveableResource
- the resource- Returns:
- a
ResourceResolver
for the specified resource
-
resourceResolverFrom
public static <T> ResourceResolver resourceResolverFrom(Class<T> clsResolvableResource, T resolveableResource) Constructs aResourceResolver
for a single resource.- Parameters:
clsResolvableResource
- theClass
of the resourceresolveableResource
- the resource- Returns:
- a
ResourceResolver
for the specified resource
-