applyTransformation
Applies the specified transformation to the given Dispatch for the DispatchScope in which this transformation is called.
Threading: this method is called on the Tealium thread, and the caller disposes the returned Disposable on the Tealium thread. completion must be called on the Tealium thread (see TealiumContext.schedulers); it may be called synchronously, before this method returns.
Completion: call completion exactly once, unless the caller has disposed the returned Disposable. Pass the transformed or unchanged dispatch for it to proceed, or null to drop it and stop any further processing.
Cancellation: the caller may dispose the returned Disposable to cancel the transformation. After that, calling completion is not required, and the caller ignores any call. Disposing after completion has been called must have no effect. Implementations with nothing to cancel, including synchronous ones, return Disposables.disposed.
Return
A Disposable that cancels in-progress work, or Disposables.disposed if there is nothing to cancel.
Parameters
The transformation to apply
The Dispatch that is being transformed.
The DispatchScope that identifies when this transformation is happening.
The Callback to call, via Callback.onComplete, with the result, as described above.