Interface PushTransport


public interface PushTransport

Low-level native push integration for a CN1Lib or private provider.

A custom transport owns the provider SDK and native registration flow. When installed with PushClient.Builder.transport(PushTransport), BuildCloud registration is disabled. The matching PushRegistrationSink is responsible for synchronizing tokens with the application's server.

The transport must invoke exactly one registration result callback for each register(Callback) attempt, report token rotations through PushTransport.Callback.registered(PushSubscription), and pass complete schema-3 JSON envelopes to PushTransport.Callback.message(String). The callback accepts calls from native threads; PushClient moves application callbacks to the EDT.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Receives events emitted by a custom transport.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the stable provider identifier stored with subscriptions.
    boolean
    Tests whether this transport is available on the current device.
    void
    Starts or refreshes native registration.
    void
    Removes the native subscription.
  • Method Details

    • getId

      String getId()
      Returns the stable provider identifier stored with subscriptions.
      Returns:
      a non-empty identifier such as company-push
    • isSupported

      boolean isSupported()
      Tests whether this transport is available on the current device.
      Returns:
      true when registration can be attempted
    • register

      void register(PushTransport.Callback callback)
      Starts or refreshes native registration.
      Parameters:
      callback - the callback used for registration and incoming messages
    • unregister

      void unregister(PushTransport.Callback callback)
      Removes the native subscription.
      Parameters:
      callback - the callback that must receive PushTransport.Callback.unregistered() when removal completes