Package com.tangosol.util
Class ChainedResourceResolver
- java.lang.Object
-
- com.tangosol.util.ChainedResourceResolver
-
- All Implemented Interfaces:
ResourceResolver
public class ChainedResourceResolver extends Object implements ResourceResolver
AChainedResourceResolveris aResourceResolverthat chains together one or more otherResourceResolvers, those of which will be queried (in the order in which they are added to theChainedResourceResolver) when attempting to resolve a resource.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.09.21
-
-
Constructor Summary
Constructors Constructor Description ChainedResourceResolver(ResourceResolver... resourceResolvers)Constructs aChainedResourceResolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> RgetResource(Class<R> clsResource)Attempts to retrieve the resource that was registered with the specified class.<R> RgetResource(Class<R> clsResource, String sResourceName)Attempts to retrieve the resource that was registered with the specified class and name.
-
-
-
Constructor Detail
-
ChainedResourceResolver
public ChainedResourceResolver(ResourceResolver... resourceResolvers)
Constructs aChainedResourceResolver.- Parameters:
resourceResolvers- theResourceResolvers to query
-
-
Method Detail
-
getResource
public <R> R getResource(Class<R> clsResource)
Attempts to retrieve the resource that was registered with the specified class.- Specified by:
getResourcein interfaceResourceResolver- Type Parameters:
R- the type of the resource- Parameters:
clsResource- the class of the resource- Returns:
- the registered resource or
nullif the resource is unknown to theResourceRegistry
-
getResource
public <R> R getResource(Class<R> clsResource, String sResourceName)
Attempts to retrieve the resource that was registered with the specified class and name.- Specified by:
getResourcein 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
nullif the resource is unknown to theResourceRegistry
-
-