Interface NotificationBackend

All Superinterfaces:
Comparable<NotificationBackend>, JolokiaService<NotificationBackend>

public interface NotificationBackend extends JolokiaService<NotificationBackend>
A notification backend which is responsible for the final delivery. This final delivery is done by a callback which a backend needs to create out of a given config. Also, a backend has a type which helps the notification handler to find the proper backend
Since:
18.03.13
Author:
roland
  • Method Details

    • getNotifType

      String getNotifType()
      Type of this backend
      Returns:
      type
    • subscribe

      BackendCallback subscribe(NotificationSubscription pSubscription)
      Create a specific callback for the given configuration. This callback will be called for every notification received
      Parameters:
      pSubscription - backend specific configuration which can be used for construction of the callback
      Returns:
      callback which is called on reception of a notification.
    • channelInit

      void channelInit(Client client, BackChannel channel)
      Callback method called when a channel has been created and opened. This can be used to start channel specific code like starting a heartbeat for SSE event.
      Parameters:
      client - the client
      channel - created channel
    • unsubscribe

      void unsubscribe(String pClientId, String pHandle)
      Unsubscribe for the given notification. Time to clean up
      Parameters:
      pClientId - client id
      pHandle - handle id for notification to unsubscribe
    • unregister

      void unregister(Client pClient)
      Unregister a client
      Parameters:
      pClient - client id
    • getConfig

      Map<String,?> getConfig()
      Return the global configuration specific for this backend. This can contain URL and other information and is returned to the client during registration The returned map must be serializable to JSON by Jolokia.
      Returns:
      the backend specific global configuration