Subscriber

abstract class Subscriber

Base class for all subscription-related methods.

Constructors

Subscriber
Link copied to clipboard
fun Subscriber()

Functions

fun cancelSubscriptionsThroughPushNotification(cipher: CryptoMethod = CryptoMethod.None, callback: WebcomDoneCallback? = null)

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

cancelSubscriptionsThroughWebhook
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).

subscribe
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.

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

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<Subscription>)

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.

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

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<Subscription>)

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

Inheritors

DatasyncNode
Link copied to clipboard