Interface PushEvents.ISink

All Known Implementing Classes:
AppSessionPushAPI, ClientSessionPushAPI, PushSessionAPI
Enclosing class:
PushEvents

public static interface PushEvents.ISink
A session's receiver of the events, matched by user and application at delivery.
Author:
Christopher Mindus
  • Method Details

    • isFor

      boolean isFor(long uid, String appId)
      Checks whether an event of a user and an application concerns this sink.
      Parameters:
      uid - The user ID.
      appId - The canonical application ID.
      Returns:
      true when the sink's session belongs to that user and that application and has a listener to tell.
    • onSubscriptionCreated

      void onSubscriptionCreated(SubscriptionRecord subscription)
      Called when a subscription was newly stored.
      Parameters:
      subscription - The row.
    • onSubscriptionRemoved

      void onSubscriptionRemoved(SubscriptionRecord subscription, String reason)
      Called when a subscription was removed.
      Parameters:
      subscription - The row as it was.
      reason - An IPushNotificationListener.REMOVED_* constant.
    • onSendFailed

      void onSendFailed(String messageID, DeliveryTarget target, DeliveryOutcome outcome, String detail)
      Called when a target of a send ended in a failure (PushEvents.FAILURES).
      Parameters:
      messageID - The message ID of the send, empty when the notification carried none.
      target - The target.
      outcome - The outcome.
      detail - The diagnostic, never null.
    • onNotificationReceived

      void onNotificationReceived(IPushReceipt receipt)
      Called when a client reported that a notification was shown (P4-11).
      Parameters:
      receipt - The receipt.
    • onNotificationAction

      void onNotificationAction(IPushReceipt receipt, String action)
      Called when a client reported a click on a notification or on one of its actions (P4-11).
      Parameters:
      receipt - The receipt.
      action - The action identity, empty for the notification itself.