Package jetbrains.buildServer.push.impl
Class DefaultTopicsRegistry
- java.lang.Object
-
- jetbrains.buildServer.push.impl.DefaultTopicsRegistry
-
- All Implemented Interfaces:
TopicsRegistry
public class DefaultTopicsRegistry extends Object implements TopicsRegistry
- Author:
- Dmitry Treskunov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDefaultTopicsRegistry.MessagesSenderstatic interfaceDefaultTopicsRegistry.TopicsLifecycleListenerclassDefaultTopicsRegistry.ValueTopic
-
Constructor Summary
Constructors Constructor Description DefaultTopicsRegistry(EventDispatcher<BuildServerListener> events, ServerMetrics serverMetrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseTopic(String topicId)After this call, all resources associated with the topic will be released.DefaultTopicsRegistry.ValueTopicgetValueTopic(String topicId)Value topic can be used when you want to broadcast messages containing the state of some value.voidinit()voidregisterInitialMsgSupplier(Function<String,TopicMessage> initialMsgSupplier)voidregisterLifecycleListener(DefaultTopicsRegistry.TopicsLifecycleListener listener)voidregisterMessagesSender(DefaultTopicsRegistry.MessagesSender sender)
-
-
-
Constructor Detail
-
DefaultTopicsRegistry
@Autowired public DefaultTopicsRegistry(EventDispatcher<BuildServerListener> events, @NotNull ServerMetrics serverMetrics)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
getValueTopic
@NotNull public DefaultTopicsRegistry.ValueTopic getValueTopic(String topicId)
Description copied from interface:TopicsRegistryValue topic can be used when you want to broadcast messages containing the state of some value. Such messages are not incremental, e.g. every message is self-contained and doesn't depend on previously broadcasted. So at any time only the last published message is important and must be delivered to the clients. For example, you can use it to push the status of the running build or count of investigation for the specific user.- Specified by:
getValueTopicin interfaceTopicsRegistry
-
closeTopic
public void closeTopic(String topicId)
Description copied from interface:TopicsRegistryAfter this call, all resources associated with the topic will be released. Don't publish to the closed topic! If you need - you can open it again using get...() method.- Specified by:
closeTopicin interfaceTopicsRegistry
-
registerInitialMsgSupplier
public void registerInitialMsgSupplier(Function<String,TopicMessage> initialMsgSupplier)
-
registerLifecycleListener
public void registerLifecycleListener(DefaultTopicsRegistry.TopicsLifecycleListener listener)
-
registerMessagesSender
public void registerMessagesSender(DefaultTopicsRegistry.MessagesSender sender)
-
-