Subscriber

abstract class Subscriber

Base class for all subscription-related methods.

Inheritors

Functions

Cancel all subscriptions previously subscribed through the mobile push notification channel of the user mobile device (with the subscribeThroughPushNotification method).

Link copied to clipboard
fun cancelSubscriptionsThroughWebhook(identifier: String, context: String, callback: WebcomDoneCallback? = null)

Cancel all subscriptions previously subscribed through the webhook channel (with the subscribeThroughWebhook method).

Link copied to clipboard
fun <T : SubscribableEvent> subscribe(type: KClass<T>, constraint: Constraint = Constraint.None, options: SubscriptionOptions = SubscriptionOptions(), callback: (Notification<T>) -> Unit): Subscription

Subscribes to a type of event with a given constraint on this data node and sends notifications to a callback function.

Link copied to clipboard
@RequiresApi(value = 26)
fun <T : SubscribableEvent> subscribeThroughPushNotification(type: KClass<T>, duration: Duration, cipher: CryptoMethod = CryptoMethod.None, includesRevocation: Boolean = true, callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node for a given duration and send notifications through the mobile push notification channel of the user mobile device.

fun <T : SubscribableEvent> subscribeThroughPushNotification(type: KClass<T>, expirationDate: Date? = null, cipher: CryptoMethod = CryptoMethod.None, includesRevocation: Boolean = true, callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node until a given expirationDate and send notifications through the mobile push notification channel of the user mobile device.

Link copied to clipboard
@RequiresApi(value = 26)
fun <T : SubscribableEvent> subscribeThroughWebhook(type: KClass<T>, identifier: String, context: String, duration: Duration, includesRevocation: Boolean = true, callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node for a given duration and send notifications to a webhook.

fun <T : SubscribableEvent> subscribeThroughWebhook(type: KClass<T>, identifier: String, context: String, expirationDate: Date? = null, includesRevocation: Boolean = true, callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node until a given expirationDate and send notifications to a webhook.