クラス DefaultSubscriptionRegistry
java.lang.ObjectSE
org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry
- 実装されているすべてのインターフェース:
- SubscriptionRegistry
 サブスクリプションをメモリに格納し、一致する宛先に 
PathMatcher を使用する SubscriptionRegistry の実装。このクラスは、宛先一致に加えてメッセージをフィルターで除外するためにヘッダーに対して評価される Spring Expression Language (SpEL) 式を使用したサブスクリプションメッセージのオプションのセレクターヘッダーもサポートします。Spring Framework 6.1 では、SpEL サポートはデフォルトで無効になっていますが、セレクターヘッダー名を設定することで有効にできます。
- 導入:
- 4.0
- 作成者:
- Rossen Stoyanchev, Sebastien Deleuze, Juergen Hoeller, Sam Brannen
- フィールドのサマリーフィールド- クラス org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry から継承されたフィールド- logger
- コンストラクターの概要コンストラクター
- メソッドのサマリー修飾子と型メソッド説明- protected void- addSubscriptionInternal- (StringSE sessionId, StringSE subscriptionId, StringSE destination, Message<?> message) - protected MultiValueMap<StringSE,- StringSE> - findSubscriptionsInternal- (StringSE destination, Message<?> message) - int解決された宛先キャッシュの最大エントリ数を返します。設定された- PathMatcherを返します。セレクターヘッダーの名前を返します。- protected void- removeSubscriptionInternal- (StringSE sessionId, StringSE subscriptionId, Message<?> message) - void- setCacheLimit- (int cacheLimit) 解決された宛先キャッシュの最大エントリ数を指定します。- void- setPathMatcher- (PathMatcher pathMatcher) 使用する- PathMatcherを指定します。- void- setSelectorHeaderName- (StringSE selectorHeaderName) サブスクリプションに一致するメッセージをフィルター処理するために、サブスクリプションメッセージに含めることができるヘッダーの名前を構成します。- void- unregisterAllSubscriptions- (StringSE sessionId) 指定された sessionId に関連付けられているすべてのサブスクリプションを削除します。- クラス org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry から継承されたメソッド- findSubscriptions, registerSubscription, unregisterSubscription
- フィールドの詳細- DEFAULT_CACHE_LIMITpublic static final int DEFAULT_CACHE_LIMIT宛先キャッシュのデフォルトの最大エントリ数: 1024。- 関連事項:
 
 
- コンストラクターの詳細- DefaultSubscriptionRegistrypublic DefaultSubscriptionRegistry()
 
- メソッドの詳細- setPathMatcher使用する- PathMatcherを指定します。
- getPathMatcher設定された- PathMatcherを返します。
- setCacheLimitpublic void setCacheLimit- (int cacheLimit) 解決された宛先キャッシュの最大エントリ数を指定します。デフォルトは 1024 です。
- getCacheLimitpublic int getCacheLimit()解決された宛先キャッシュの最大エントリ数を返します。
- setSelectorHeaderNameサブスクリプションに一致するメッセージをフィルター処理するために、サブスクリプションメッセージに含めることができるヘッダーの名前を構成します。- ヘッダー値は、サブスクリプションに一致するメッセージのヘッダーに適用される Spring Expression Language (SpEL) ブール式であることが想定されます。 - 例: - headers.foo == 'bar' - デフォルトでは、セレクターヘッダー名は - nullに設定されており、この機能は無効になっています。これを- "selector"または別の名前に設定して、セレクターヘッダーのサポートを有効にすることができます。- パラメーター:
- selectorHeaderName- セレクターヘッダーに使用する名前、またはセレクターヘッダーのサポートを無効にする場合は- nullまたは空白
- 導入:
- 4.2
 
- getSelectorHeaderNameセレクターヘッダーの名前を返します。- 導入:
- 4.2
- 関連事項:
 
- addSubscriptionInternalprotected void addSubscriptionInternal- (StringSE sessionId, StringSE subscriptionId, StringSE destination, Message<?> message) - 次で指定:
-  クラス AbstractSubscriptionRegistryのaddSubscriptionInternal
 
- removeSubscriptionInternal
- unregisterAllSubscriptionsインターフェースからコピーされた説明:- SubscriptionRegistry指定された sessionId に関連付けられているすべてのサブスクリプションを削除します。
- findSubscriptionsInternalprotected MultiValueMap<StringSE,- StringSE> findSubscriptionsInternal- (StringSE destination, Message<?> message)