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 subsId, 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 subsId, Message<?> message) |
void | setCacheLimit(int cacheLimit) 解決された宛先キャッシュの最大エントリ数を指定します。 |
void | setPathMatcher(PathMatcher pathMatcher) 使用する PathMatcher を指定します。 |
void | setSelectorHeaderName(StringSE selectorHeaderName) ヘッダーに基づいてメッセージをフィルタリングするために、サブスクリプションメッセージに含めることができるセレクタヘッダーの名前を設定します。 |
StringSE | toString() |
void | unregisterAllSubscriptions(StringSE sessionId) 指定された sessionId に関連付けられているすべてのサブスクリプションを削除します。 |
findSubscriptions, registerSubscription, unregisterSubscription
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, 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(StringSE selectorHeaderName)
たとえば、次の式は、"foo" というヘッダーの値が "bar" であると想定しています。
headers.foo == 'bar'
デフォルトでは "selector" に設定されています。
public StringSE getSelectorHeaderName()
protected void addSubscriptionInternal(StringSE sessionId, StringSE subsId, StringSE destination, Message<?> message)
AbstractSubscriptionRegistry
の addSubscriptionInternal
protected void removeSubscriptionInternal(StringSE sessionId, StringSE subsId, Message<?> message)
public void unregisterAllSubscriptions(StringSE sessionId)
SubscriptionRegistry
protected MultiValueMap<StringSE,StringSE> findSubscriptionsInternal(StringSE destination, Message<?> message)
public StringSE toString()
ObjectSE
の toStringSE