public class InMemoryMulticastReceiverRegistry extends Object implements MulticastReceiverRegistry
| Constructor and Description |
|---|
InMemoryMulticastReceiverRegistry(MulticastWildcardRegexFactory multicastWildcardRegexFactory) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Set<String>> |
getReceivers()
Obtain a map representing all currently registered receivers.
|
Set<String> |
getReceivers(String multicastId)
Obtains the current set of participant IDs of the those receivers interested in the given multicast.
|
void |
registerMulticastReceiver(String multicastId,
String participantId)
Add an interested receiver's participant ID to the set of those interested for the given
multicast ID.
|
void |
unregisterMulticastReceiver(String multicastId,
String participantId)
This method is the reverse operation of
MulticastReceiverRegistry.registerMulticastReceiver(String, String) and will
remove an interested participant from the set of those interested in the given multicast. |
@Inject public InMemoryMulticastReceiverRegistry(MulticastWildcardRegexFactory multicastWildcardRegexFactory)
public void registerMulticastReceiver(String multicastId, String participantId)
MulticastReceiverRegistryregisterMulticastReceiver in interface MulticastReceiverRegistrymulticastId - the ID of the multicast the receiver is interested in.participantId - the participant ID of the receiver interested in the multicast.public void unregisterMulticastReceiver(String multicastId, String participantId)
MulticastReceiverRegistryMulticastReceiverRegistry.registerMulticastReceiver(String, String) and will
remove an interested participant from the set of those interested in the given multicast.unregisterMulticastReceiver in interface MulticastReceiverRegistrymulticastId - the ID of the multicast the participant is no longer interested in.participantId - the ID of the participant wanting to remove themselves from the set of interested receiers.public Set<String> getReceivers(String multicastId)
MulticastReceiverRegistrygetReceivers in interface MulticastReceiverRegistrymulticastId - the ID of the multicast for which to obtain the set of interested receivers.public Map<String,Set<String>> getReceivers()
MulticastReceiverRegistrygetReceivers in interface MulticastReceiverRegistryCopyright © 2021. All rights reserved.