public interface AsyncClientGroupService
The client group service is only available for clients which already have a session available.
When a client connects, the earliest point in time to add the client to a group is the OnSessionReadyCallback.
The client group service is only available when all nodes in the HiveMQ cluster are at version 3.3.0 or above.
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Void> |
addClientToGroup(String group,
ClientData clientData)
Adds a client to a group.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
addClientToGroup(String group,
String clientIdentifier)
Adds a client to a group.
|
com.google.common.util.concurrent.ListenableFuture<com.google.common.collect.ImmutableSet<String>> |
getAvailableGroups()
Retrieves all available groups.
|
com.google.common.util.concurrent.ListenableFuture<com.google.common.collect.ImmutableSet<String>> |
getClientsForGroup(String group)
Retrieves the clients for a group.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
removeClientFromGroup(String group,
String clientIdentifier)
Removes a client from a group.
|
@NotNull com.google.common.util.concurrent.ListenableFuture<Void> addClientToGroup(@NotNull String group, @NotNull ClientData clientData)
group - the group the client will be added to.clientData - the clientData of the client which will be added to the group.ListenableFuture succeeding when the client is added to the group,
failing with a NoSuchClientIdException if no session for the client to the given clientData exists,
failing with a IncompatibleHiveMQVersionException if a node with a version lower than 3.3.0 exists in the cluster.
failing with a RateLimitExceededException if the plugin service rate limit was exceeded.@NotNull com.google.common.util.concurrent.ListenableFuture<Void> addClientToGroup(@NotNull String group, @NotNull String clientIdentifier)
group - the group the client will be added to.clientIdentifier - the identifier of the client which will be added to the group.ListenableFuture succeeding when the client is added to the group,
failing with a NoSuchClientIdException if no session for the client with the given identifier exists,
failing with a IncompatibleHiveMQVersionException if a node with a version lower than 3.3.0 exists in the cluster.
failing with a RateLimitExceededException if the plugin service rate limit was exceeded.@NotNull com.google.common.util.concurrent.ListenableFuture<Void> removeClientFromGroup(@NotNull String group, @NotNull String clientIdentifier)
group - the group the client will be removed from.clientIdentifier - the identifier of the client which will be added to the group.ListenableFuture succeeding when the client is removed from the group,
failing with a IncompatibleHiveMQVersionException if a node with a version lower than 3.3.0 exists in the cluster.
failing with a RateLimitExceededException if the plugin service rate limit was exceeded.@NotNull com.google.common.util.concurrent.ListenableFuture<com.google.common.collect.ImmutableSet<String>> getClientsForGroup(@NotNull String group)
group - the group the clients will be retrieved of.ListenableFuture succeeding with the clients belonging to the given group,
failing with a IncompatibleHiveMQVersionException if a node with a version lower than 3.3.0 exists in the cluster.
failing with a RateLimitExceededException if the plugin service rate limit was exceeded.@NotNull com.google.common.util.concurrent.ListenableFuture<com.google.common.collect.ImmutableSet<String>> getAvailableGroups()
ListenableFuture succeeding with the all available groups,
failing with a IncompatibleHiveMQVersionException if a node with a version lower than 3.3.0 exists in the cluster.
failing with a RateLimitExceededException if the plugin service rate limit was exceeded.Copyright © 2013-2018 dc-square GmbH. All Rights Reserved.