Interface ResponseTransformation<T>

Type Parameters:
T - The target object for the transformation.
All Known Implementing Classes:
DefaultResponseTransformation

public interface ResponseTransformation<T>
Transforms the ResponsePromise into a target object, allowing for transforming functions based on different HTTP codes or exceptions. Under the covers, all functions are used in a fold() call.
  • Method Details

    • getFailFunction

      Function<Throwable, ? extends T> getFailFunction()
    • getSuccessFunctions

      Function<Response,T> getSuccessFunctions()
    • apply

      io.atlassian.util.concurrent.Promise<T> apply(ResponsePromise responsePromise)
      Converts the transformation into a promise for further mapping
      Returns:
      A promise that will return the object