public interface BlockingSubscriptionStore
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscription(String clientID,
Topic topic)
This method adds a subscription for a certain client to a certain topic.
|
void |
addSubscriptions(String clientID,
Set<Topic> topics)
This method adds subscriptions for a certain client to certain topics.
|
Set<String> |
getLocalSubscribers(String topic)
Returns all MQTT client subscriber identifiers for a given topic, for this HiveMQ instance.
|
com.google.common.collect.Multimap<String,Topic> |
getLocalSubscriptions()
This method returns all subscriptions on this HiveMQ Node as a
Multimap of client identifiers and topics. |
Set<Topic> |
getLocalTopics(String clientID)
Returns all topics a client is subscribed to, on this HiveMQ instance.
|
Set<String> |
getSubscribers(String topic)
Returns all MQTT client subscriber identifiers for a given topic, this HiveMQ instance and all other nodes in a HiveMQ cluster.
|
com.google.common.collect.Multimap<String,Topic> |
getSubscriptions()
This method returns all subscriptions this HiveMQ instance and all other nodes in a HiveMQ cluster,
as a
Multimap of client identifiers and topics. |
Set<Topic> |
getTopics(String clientID)
Returns all topics a client is subscribed to, on this HiveMQ instance and all other nodes in a HiveMQ cluster.
|
void |
removeSubscription(String clientID,
String topic)
This method removes a subscription for a certain client and a certain topic.
|
void |
removeSubscriptions(String clientID,
Set<String> topics)
This method removes subscriptions for a certain client and certain topics.
|
@ReadOnly com.google.common.collect.Multimap<String,Topic> getLocalSubscriptions()
Multimap of client identifiers and topics.
You won't receive subscriptions of connected
clients from other HiveMQ nodes if HiveMQ runs in a cluster.
Please be aware that calling this method on HiveMQ instances with many subscriptions could have
negative performance effects.
The returned Multimap is read-only and must not be modified.Multimap of client identifiers and their topic subscriptionsRateLimitExceededException - if the plugin service rate limit was exceeded.@ReadOnly Set<String> getLocalSubscribers(@NotNull String topic)
null as topic. This method is lenient, so
it will just return an empty Set.
The returned Set is read-only and must not be modified.topic - the topicRateLimitExceededException - if the plugin service rate limit was exceeded.@ReadOnly Set<Topic> getLocalTopics(@NotNull String clientID)
null as clientId. This method is lenient, so
it will just return an empty Set.
The returned Set is read-only and must not be modified.clientID - of the clientRateLimitExceededException - if the plugin service rate limit was exceeded.void addSubscription(@NotNull String clientID, @NotNull Topic topic)
null, nothing will happen.clientID - client, which should be subscribedtopic - topic to which the client should be subscribedRateLimitExceededException - if the plugin service rate limit was exceeded.void addSubscriptions(@NotNull String clientID, @NotNull Set<Topic> topics)
clientID - client, which should be subscribedtopics - topics to which the client should be subscribedRateLimitExceededException - if the plugin service rate limit was exceeded.InvalidTopicException - if any topic is not utf-8 well-formed or empty.NoSuchClientIdException - if a client does not exist.NullPointerException - if clientID or topics is null.IllegalArgumentException - if clientID or topics is empty.void removeSubscription(@NotNull String clientID, @NotNull String topic)
clientID - client, which should get unsubscribedtopic - topic from which the client should get unsubscribedRateLimitExceededException - if the plugin service rate limit was exceeded.void removeSubscriptions(@NotNull String clientID, @NotNull Set<String> topics)
clientID - client, which should get unsubscribedtopics - topics from which the client should get unsubscribedRateLimitExceededException - if the plugin service rate limit was exceeded.NullPointerException - if clientID or topics is null.IllegalArgumentException - if clientID or topics is empty.@ReadOnly com.google.common.collect.Multimap<String,Topic> getSubscriptions()
Multimap of client identifiers and topics.
Please be aware that calling this method on HiveMQ instances with many subscriptions could have
negative performance effects.
The returned Multimap is read-only and must not be modified.Multimap of client identifiers and their topic subscriptionsRateLimitExceededException - if the plugin service rate limit was exceeded.@ReadOnly Set<String> getSubscribers(@NotNull String topic)
null as topic. This method is lenient, so
it will just return an empty Set.
The returned Set is read-only and must not be modified.topic - the topicRateLimitExceededException - if the plugin service rate limit was exceeded.@ReadOnly Set<Topic> getTopics(@NotNull String clientID)
null as clientId. This method is lenient, so
it will just return an empty Set.
The returned Set is read-only and must not be modified.clientID - of the clientRateLimitExceededException - if the plugin service rate limit was exceeded.Copyright © 2013-2018 dc-square GmbH. All Rights Reserved.