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 Summary
Modifier and TypeMethodDescriptionbooleanChecks whether an event of a user and an application concerns this sink.voidonNotificationAction(IPushReceipt receipt, String action) Called when a client reported a click on a notification or on one of its actions (P4-11).voidonNotificationReceived(IPushReceipt receipt) Called when a client reported that a notification was shown (P4-11).voidonSendFailed(String messageID, DeliveryTarget target, DeliveryOutcome outcome, String detail) Called when a target of a send ended in a failure (PushEvents.FAILURES).voidonSubscriptionCreated(SubscriptionRecord subscription) Called when a subscription was newly stored.voidonSubscriptionRemoved(SubscriptionRecord subscription, String reason) Called when a subscription was removed.
Method Details
isFor
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
Called when a subscription was newly stored.- Parameters:
subscription- The row.
onSubscriptionRemoved
Called when a subscription was removed.- Parameters:
subscription- The row as it was.reason- AnIPushNotificationListener.REMOVED_*constant.
onSendFailed
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
Called when a client reported that a notification was shown (P4-11).- Parameters:
receipt- The receipt.
onNotificationAction
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.