public class AmbariSubscriptionRegistry
extends org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
SubscriptionRegistry that has configurable cache size, optimized working with cache and
destinations matching.| Constructor and Description |
|---|
AmbariSubscriptionRegistry(int cacheLimit) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSubscriptionInternal(String sessionId,
String subsId,
String destination,
org.springframework.messaging.Message<?> message) |
protected org.springframework.util.MultiValueMap<String,String> |
findSubscriptionsInternal(String destination,
org.springframework.messaging.Message<?> message) |
int |
getCacheLimit()
Return the maximum number of entries for the resolved destination cache.
|
org.springframework.util.PathMatcher |
getPathMatcher()
Return the configured
PathMatcher. |
String |
getSelectorHeaderName()
Return the name for the selector header.
|
protected void |
removeSubscriptionInternal(String sessionId,
String subsId,
org.springframework.messaging.Message<?> message) |
void |
setCacheLimit(int cacheLimit)
Specify the maximum number of entries for the resolved destination cache.
|
void |
setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
Specify the
PathMatcher to use. |
void |
setSelectorHeaderName(String selectorHeaderName)
Configure the name of a selector header that a subscription message can
have in order to filter messages based on their headers.
|
String |
toString() |
void |
unregisterAllSubscriptions(String sessionId) |
public void setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
PathMatcher to use.public org.springframework.util.PathMatcher getPathMatcher()
PathMatcher.public void setCacheLimit(int cacheLimit)
public int getCacheLimit()
public void setSelectorHeaderName(String selectorHeaderName)
For example the following expression expects a header called "foo" to have the value "bar":
headers.foo == 'bar'
By default this is set to "selector".
public String getSelectorHeaderName()
protected void addSubscriptionInternal(String sessionId, String subsId, String destination, org.springframework.messaging.Message<?> message)
addSubscriptionInternal in class org.springframework.messaging.simp.broker.AbstractSubscriptionRegistryprotected void removeSubscriptionInternal(String sessionId, String subsId, org.springframework.messaging.Message<?> message)
removeSubscriptionInternal in class org.springframework.messaging.simp.broker.AbstractSubscriptionRegistrypublic void unregisterAllSubscriptions(String sessionId)
protected org.springframework.util.MultiValueMap<String,String> findSubscriptionsInternal(String destination, org.springframework.messaging.Message<?> message)
findSubscriptionsInternal in class org.springframework.messaging.simp.broker.AbstractSubscriptionRegistryCopyright © 2022 Apache Software Foundation. All rights reserved.