D
- 宛先型 public class CachingDestinationResolverProxy<D> extends ObjectSE implements DestinationResolver<D>, InitializingBean
resolveDestination(java.lang.String)
結果をキャッシュする DestinationResolver
実装。このようなキャッシングは、宛先の解決プロセスにコストがかかり(たとえば、宛先が外部システムを通じて解決される必要がある場合)、解決結果がいずれにしても安定している場合に特に役立ちます。DestinationResolver.resolveDestination(java.lang.String)
コンストラクターと説明 |
---|
CachingDestinationResolverProxy() 新しい CachingDestinationResolverProxy を作成し、 setTargetDestinationResolver(org.springframework.messaging.core.DestinationResolver<D>) Bean プロパティを介してターゲット DestinationResolver を設定します。 |
CachingDestinationResolverProxy(DestinationResolver<D> targetDestinationResolver) 指定されたターゲット DestinationResolver を使用して新しい CachingDestinationResolverProxy を作成し、実際に宛先を解決します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
D | resolveDestination(StringSE name) ターゲット DestinationResolver 実装によって正常に解決された場合、宛先を解決してキャッシュします。 |
void | setTargetDestinationResolver(DestinationResolver<D> targetDestinationResolver) 委譲先のターゲット DestinationResolver を設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public CachingDestinationResolverProxy()
setTargetDestinationResolver(org.springframework.messaging.core.DestinationResolver<D>)
Bean プロパティを介してターゲット DestinationResolver を設定します。public CachingDestinationResolverProxy(DestinationResolver<D> targetDestinationResolver)
targetDestinationResolver
- 委譲先のターゲット DestinationResolverpublic void setTargetDestinationResolver(DestinationResolver<D> targetDestinationResolver)
public void afterPropertiesSet()
InitializingBean
BeanFactoryAware
、ApplicationContextAware
などを満たした後、包含 BeanFactory
によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean
の afterPropertiesSet
public D resolveDestination(StringSE name) throws DestinationResolutionException
DestinationResolver<D>
の resolveDestination
name
- 解決される宛先名 DestinationResolutionException
- ターゲット DestinationResolver が宛先解決中にエラーを報告した場合