接口 SubscriptionRegistry
public interface SubscriptionRegistry
A registry of subscription by session that allows looking up subscriptions.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 MultiValueMap<String,String>
findSubscriptions(Message<?> message)
Find all subscriptions that should receive the given message.void
registerSubscription(Message<?> subscribeMessage)
Register a subscription represented by the given message.void
unregisterAllSubscriptions(String sessionId)
Remove all subscriptions associated with the given sessionId.void
unregisterSubscription(Message<?> unsubscribeMessage)
Unregister a subscription.
方法详细资料
registerSubscription
void registerSubscription(Message<?> subscribeMessage)
Register a subscription represented by the given message.- 参数:
subscribeMessage
- the subscription request
unregisterSubscription
void unregisterSubscription(Message<?> unsubscribeMessage)
Unregister a subscription.- 参数:
unsubscribeMessage
- the request to unsubscribe
unregisterAllSubscriptions
void unregisterAllSubscriptions(String sessionId)
Remove all subscriptions associated with the given sessionId.
findSubscriptions
MultiValueMap<String,String> findSubscriptions(Message<?> message)
Find all subscriptions that should receive the given message. The map returned is safe to iterate and will never be modified.- 参数:
message
- the message- 返回:
- a
MultiValueMap
with sessionId-subscriptionId pairs (possibly empty)