Package com.tangosol.util
Class ChainedResourceResolver
java.lang.Object
com.tangosol.util.ChainedResourceResolver
- All Implemented Interfaces:
ResourceResolver
A
ChainedResourceResolver
is a ResourceResolver
that
chains together one or more other ResourceResolver
s, those of which
will be queried (in the order in which they are added to the ChainedResourceResolver
)
when attempting to resolve a resource.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.09.21
-
Constructor Summary
ConstructorDescriptionChainedResourceResolver
(ResourceResolver... resourceResolvers) Constructs aChainedResourceResolver
. -
Method Summary
Modifier and TypeMethodDescription<R> R
getResource
(Class<R> clsResource) Attempts to retrieve the resource that was registered with the specified class.<R> R
getResource
(Class<R> clsResource, String sResourceName) Attempts to retrieve the resource that was registered with the specified class and name.
-
Constructor Details
-
ChainedResourceResolver
Constructs aChainedResourceResolver
.- Parameters:
resourceResolvers
- theResourceResolver
s to query
-
-
Method Details
-
getResource
Attempts to retrieve the resource that was registered with the specified class.- Specified by:
getResource
in interfaceResourceResolver
- Type Parameters:
R
- the type of the resource- Parameters:
clsResource
- the class of the resource- Returns:
- the registered resource or
null
if the resource is unknown to theResourceRegistry
-
getResource
Attempts to retrieve the resource that was registered with the specified class and name.- Specified by:
getResource
in interfaceResourceResolver
- Type Parameters:
R
- the type of the resource- Parameters:
clsResource
- the class of the resourcesResourceName
- the name of the resource- Returns:
- the registered resource or
null
if the resource is unknown to theResourceRegistry
-