WhenReadyHandler

Package: com.salesforce.marketingcloud.pushfeature

Module: Push Feature Module v2.0.0

Description 

An abstract handler class that manages asynchronous SDK requests by delivering PushFeature instances to registered listeners using Android’s Handler mechanism on the appropriate thread.

Class Signature 

1abstract class WhenReadyHandler(
2    looper: Looper?,
3    val listener: WhenReadyListener
4)

Constructors 

WhenReadyHandler 

1constructor(looper: Looper?, listener: WhenReadyListener)

Creates a new instance with the specified Looper and listener.

Parameters:

  • looper - The Looper for thread handling (nullable)
  • listener - The WhenReadyListener to receive callbacks

Properties 

completed 

1@Volatile
2var completed: Boolean

Indicates whether the operation has completed.

listener 

1val listener: WhenReadyListener

The listener that receives SDK callbacks.

Methods 

deliverSdk 

1fun deliverSdk()

Delivers the SDK instance to the registered listener.