DefaultSubscriptionRegistry

Implementation of {@link SubscriptionRegistry} that stores subscriptions in memory and uses a {@link hunt.framework.util.PathMatcher PathMatcher} for matching destinations.

<p>As of 4.2, this class supports a {@link #setSelectorHeaderName selector} header on subscription messages with Spring EL expressions evaluated against the headers to filter out messages in addition to destination matching.

@author Rossen Stoyanchev @author Sebastien Deleuze @author Juergen Hoeller @since 4.0

Constructors

this
this()
Undocumented in source.

Members

Functions

addSubscriptionInternal
void addSubscriptionInternal(string sessionId, string subsId, string destination, MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
findSubscriptionsInternal
MultiValueMap!(string, string) findSubscriptionsInternal(string destination, MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
getCacheLimit
int getCacheLimit()

Return the maximum number of entries for the resolved destination cache.

getPathMatcher
PathMatcher getPathMatcher()

Return the configured {@link PathMatcher}.

getSelectorHeaderName
string getSelectorHeaderName()

Return the name for the selector header name. @since 4.2

removeSubscriptionInternal
void removeSubscriptionInternal(string sessionId, string subsId, MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
setCacheLimit
void setCacheLimit(int cacheLimit)

Specify the maximum number of entries for the resolved destination cache. Default is 1024.

setPathMatcher
void setPathMatcher(PathMatcher pathMatcher)

Specify the {@link PathMatcher} to use.

setSelectorHeaderName
void setSelectorHeaderName(string selectorHeaderName)

Configure the name of a header that a subscription message can have for the purpose of filtering messages matched to the subscription. The header value is expected to be a Spring EL expression to be applied to the headers of messages matched to the subscription. <p>For example: <pre> headers.foo == 'bar' </pre> <p>By default this is set to "selector". You can set it to a different name, or to {@code null} to turn off support for a selector header. @param selectorHeaderName the name to use for a selector header @since 4.2

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
unregisterAllSubscriptions
void unregisterAllSubscriptions(string sessionId)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

DEFAULT_CACHE_LIMIT
enum int DEFAULT_CACHE_LIMIT;

Default maximum number of entries for the destination cache: 1024.

Inherited Members

From AbstractSubscriptionRegistry

registerSubscription
void registerSubscription(MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
unregisterSubscription
void unregisterSubscription(MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
findSubscriptions
MultiValueMap!(string, string) findSubscriptions(MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
addSubscriptionInternal
void addSubscriptionInternal(string sessionId, string subscriptionId, string destination, MessageBase message)
Undocumented in source.
removeSubscriptionInternal
void removeSubscriptionInternal(string sessionId, string subscriptionId, MessageBase message)
Undocumented in source.
findSubscriptionsInternal
MultiValueMap!(string, string) findSubscriptionsInternal(string destination, MessageBase message)
Undocumented in source.

Meta