public class CachingDestinationResolverProxy<D> extends java.lang.Object implements DestinationResolver<D>, InitializingBean
DestinationResolverimplementation that proxies a target DestinationResolver, caching its
resolveDestination(java.lang.String)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.
|Constructor and Description|
Create a new CachingDestinationResolverProxy, setting the target DestinationResolver through the
Create a new CachingDestinationResolverProxy using the given target DestinationResolver to actually resolve destinations.
|Modifier and Type||Method and Description|
Invoked by the containing
Resolves and caches destinations if successfully resolved by the target DestinationResolver implementation.
Set the target DestinationResolver to delegate to.
public CachingDestinationResolverProxy(DestinationResolver<D> targetDestinationResolver)
targetDestinationResolver- the target DestinationResolver to delegate to
public void setTargetDestinationResolver(DestinationResolver<D> targetDestinationResolver)
public void afterPropertiesSet()
BeanFactoryafter it has set all bean properties and satisfied
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 resolveDestination(java.lang.String name) throws DestinationResolutionException
name- the destination name to be resolved
DestinationResolutionException- if the target DestinationResolver reports an error during destination resolution