DestinationResolver implementation that proxies a target DestinationResolver,
caching its resolveDestination results. Such caching is particularly useful
if the destination resolving process is expensive (e.g. the destination has to be
resolved through an external system) and the resolution results are stable anyway.
DestinationResolver#resolveDestination
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private DestinationResolver |
| Access | Constructor and Description |
|---|---|
| public | CachingDestinationResolverProxy()
Create a new CachingDestinationResolverProxy, setting the target DestinationResolver
through the |
| public | CachingDestinationResolverProxy(DestinationResolver<D>
the target DestinationResolver to delegate to targetDestinationResolver)Create a new CachingDestinationResolverProxy using the given target DestinationResolver to actually resolve destinations. |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public D | Returns: the currently resolved destination or an already cached destinationthe destination name to be resolved name)Implements org. Resolves and caches destinations if successfully resolved by the target DestinationResolver implementation. |
| public void | setTargetDestinationResolver(DestinationResolver<D> targetDestinationResolver)
Set the target DestinationResolver to delegate to. |
| resolvedDestinationCache | back to summary |
|---|---|
| private final Map<String, D> resolvedDestinationCache | |
| targetDestinationResolver | back to summary |
|---|---|
| private DestinationResolver<D> targetDestinationResolver
| |
| CachingDestinationResolverProxy | back to summary |
|---|---|
| public CachingDestinationResolverProxy() Create a new CachingDestinationResolverProxy, setting the target DestinationResolver
through the | |
| CachingDestinationResolverProxy | back to summary |
|---|---|
| public CachingDestinationResolverProxy(DestinationResolver<D> targetDestinationResolver) Create a new CachingDestinationResolverProxy using the given target DestinationResolver to actually resolve destinations.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| resolveDestination | back to summary |
|---|---|
| public D resolveDestination(String name) throws DestinationResolutionException Implements org. Resolves and caches destinations if successfully resolved by the target DestinationResolver implementation.
| |
| setTargetDestinationResolver | back to summary |
|---|---|
| public void setTargetDestinationResolver(DestinationResolver<D> targetDestinationResolver) Set the target DestinationResolver to delegate to. | |