Class SubscriptionService

  • All Implemented Interfaces:
    NotificationService

    public class SubscriptionService
    extends Object
    implements NotificationService
    Web-socket client endpoint that bridges AM notifications protocol to our own API.

    This class manages subscriptions requests and acknowledgments asynchronously.

    This class is web-socket implementation-free (no dependency on any web-socket container specific API or behaviour).

    • Constructor Detail

      • SubscriptionService

        public SubscriptionService​(TopicManager manager)
        SubscriptionService constructor taking a TopicManager.
        Parameters:
        manager - TopicManager to handle topic subscription
    • Method Detail

      • onOpen

        public void onOpen​(WebSocketAdapter webSocket)
        Means of notifying the SubscriptionService that a notification provider available.
        Parameters:
        webSocket - the WebSocket to use to handle notification registration
      • onClose

        public void onClose()
        Means of notifying the SubscriptionService that a notification provider has closed.
      • onMessage

        public void onMessage​(JsonValue message)
        Means of supplying the SubscriptionService with subscription and notification messages.
        Parameters:
        message - the subscription or notification message