Top Description Methods
org.springframework.messaging.simp.broker

public Interface SubscriptionRegistry

Known Direct Implementers
org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
Imports
org.springframework.messaging.Message, org.springframework.util.MultiValueMap

A registry of subscription by session that allows looking up subscriptions.
Author
Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public MultiValueMap<String, String>

Returns:

a MultiValueMap with sessionId-subscriptionId pairs (possibly empty)
findSubscriptions
(Message<?>
the message
message
)

Find all subscriptions that should receive the given message.

public void
registerSubscription(Message<?>
the subscription request
subscribeMessage
)

Register a subscription represented by the given message.

public void
unregisterAllSubscriptions(String sessionId)

Remove all subscriptions associated with the given sessionId.

public void
unregisterSubscription(Message<?>
the request to unsubscribe
unsubscribeMessage
)

Unregister a subscription.

Method Detail

findSubscriptionsback to summary
public 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.

Parameters
message:Message<?>

the message

Returns:MultiValueMap<String, String>

a MultiValueMap with sessionId-subscriptionId pairs (possibly empty)

registerSubscriptionback to summary
public void registerSubscription(Message<?> subscribeMessage)

Register a subscription represented by the given message.

Parameters
subscribeMessage:Message<?>

the subscription request

unregisterAllSubscriptionsback to summary
public void unregisterAllSubscriptions(String sessionId)

Remove all subscriptions associated with the given sessionId.

unregisterSubscriptionback to summary
public void unregisterSubscription(Message<?> unsubscribeMessage)

Unregister a subscription.

Parameters
unsubscribeMessage:Message<?>

the request to unsubscribe