クラス DefaultSubscriptionRegistry
java.lang.ObjectSE
org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry
- 実装されたすべてのインターフェース:
SubscriptionRegistry
サブスクリプションをメモリに格納し、一致する宛先に
PathMatcher
を使用する SubscriptionRegistry
の実装。4.2 以降、このクラスは、宛先照合に加えてメッセージをフィルターで除外するためにヘッダーに対して評価される Spring EL 式を使用して、サブスクリプションメッセージの selector
ヘッダーをサポートします。
- 導入:
- 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_LIMIT
public static final int DEFAULT_CACHE_LIMIT宛先キャッシュのデフォルトの最大エントリ数: 1024。- 関連事項:
コンストラクターの詳細
DefaultSubscriptionRegistry
public DefaultSubscriptionRegistry()
メソッドの詳細
setPathMatcher
使用するPathMatcher
を指定します。getPathMatcher
設定されたPathMatcher
を返します。setCacheLimit
public void setCacheLimit(int cacheLimit) 解決された宛先キャッシュの最大エントリ数を指定します。デフォルトは 1024 です。getCacheLimit
public int getCacheLimit()解決された宛先キャッシュの最大エントリ数を返します。setSelectorHeaderName
サブスクリプションに一致するメッセージをフィルター処理するために、サブスクリプションメッセージに含めることができるヘッダーの名前を構成します。ヘッダー値は、サブスクリプションに一致するメッセージのヘッダーに適用される Spring Expression Language (SpEL) ブール式であることが想定されます。
例:
headers.foo == 'bar'
デフォルトでは、これは「セレクタ」に設定されています。別の名前に設定するか、
null
に設定して、セレクタヘッダーのサポートをオフにすることができます。- パラメーター:
selectorHeaderName
- セレクターヘッダーに使用する名前- 導入:
- 4.2
getSelectorHeaderName
セレクターヘッダーの名前を返します。- 導入:
- 4.2
- 関連事項:
addSubscriptionInternal
protected void addSubscriptionInternal(StringSE sessionId, StringSE subscriptionId, StringSE destination, Message<?> message) - 次で指定:
- クラス
AbstractSubscriptionRegistry
のaddSubscriptionInternal
removeSubscriptionInternal
unregisterAllSubscriptions
インターフェースからコピーされた説明:SubscriptionRegistry
指定された sessionId に関連付けられているすべてのサブスクリプションを削除します。findSubscriptionsInternal
protected MultiValueMap<StringSE,StringSE> findSubscriptionsInternal(StringSE destination, Message<?> message)