Interface TopicsRegistry

  • All Known Implementing Classes:
    DefaultTopicsRegistry

    public interface TopicsRegistry
    Main entry point to the Server Push functionality. You can publish messages to the created Topic instance and be sure that the clients who subscribed to this topic will receive all these messages using WebSocket connection or plain old polling.
    Author:
    Dmitry Treskunov
    • Method Detail

      • getValueTopic

        @NotNull
        Topic getValueTopic​(String topicId)
        Value 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.
      • closeTopic

        void closeTopic​(String topicId)
        After 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.