public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry
PathMatcher
を使用する SubscriptionRegistry
の実装。4.2 以降、このクラスは、宛先照合に加えてメッセージをフィルターで除外するためにヘッダーに対して評価される Spring EL 式を使用して、サブスクリプションメッセージの selector
ヘッダーをサポートします。
修飾子と型 | フィールドと説明 |
---|---|
static int | DEFAULT_CACHE_LIMIT 宛先キャッシュのデフォルトの最大エントリ数: 1024。 |
logger
コンストラクターと説明 |
---|
DefaultSubscriptionRegistry() |
修飾子と型 | メソッドと説明 |
---|---|
protected void | addSubscriptionInternal(StringSE sessionId, StringSE subscriptionId, StringSE destination, Message<?> message) |
protected MultiValueMap<StringSE, StringSE> | findSubscriptionsInternal(StringSE destination, Message<?> message) |
int | getCacheLimit() 解決された宛先キャッシュの最大エントリ数を返します。 |
PathMatcher | getPathMatcher() 設定された PathMatcher を返します。 |
StringSE | getSelectorHeaderName() セレクターヘッダー名の名前を返します。 |
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 に関連付けられているすべてのサブスクリプションを削除します。 |
findSubscriptions, registerSubscription, unregisterSubscription
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static final int DEFAULT_CACHE_LIMIT
public void setPathMatcher(PathMatcher pathMatcher)
PathMatcher
を指定します。public PathMatcher getPathMatcher()
PathMatcher
を返します。public void setCacheLimit(int cacheLimit)
public int getCacheLimit()
public void setSelectorHeaderName(@Nullable StringSE selectorHeaderName)
例:
headers.foo == 'bar'
デフォルトでは、これは「セレクタ」に設定されています。別の名前に設定するか、null
に設定して、セレクタヘッダーのサポートをオフにすることができます。
selectorHeaderName
- セレクターヘッダーに使用する名前 protected void addSubscriptionInternal(StringSE sessionId, StringSE subscriptionId, StringSE destination, Message<?> message)
AbstractSubscriptionRegistry
の addSubscriptionInternal
protected void removeSubscriptionInternal(StringSE sessionId, StringSE subscriptionId, Message<?> message)
public void unregisterAllSubscriptions(StringSE sessionId)
SubscriptionRegistry
protected MultiValueMap<StringSE,StringSE> findSubscriptionsInternal(StringSE destination, Message<?> message)