public interface PushRegistrationSink

Mirrors native subscription changes to an application-owned server.

This interface is optional with managed BuildCloud push. It is mandatory when a PushTransport is supplied, because custom transport mode never sends registration data to BuildCloud. Implementations should upsert by installation ID and replace rotated tokens.

Callbacks run on the Codename One EDT. Network work should be queued asynchronously rather than blocking the callback.

Methods

public abstract void registered(PushSubscription subscription)Stores or replaces a subscription on the application-owned server.
public abstract void unregistered(PushSubscription subscription)Removes a subscription after the transport unregisters.

Method details

registered

public abstract void registered(PushSubscription subscription)
Stores or replaces a subscription on the application-owned server.

Parameters

subscription PushSubscription
the current native subscription

unregistered

public abstract void unregistered(PushSubscription subscription)
Removes a subscription after the transport unregisters.

Parameters

subscription PushSubscription
the subscription that was active before removal