Interface ResponsePromise

All Superinterfaces:
Future<Response>, io.atlassian.util.concurrent.Promise<Response>

public interface ResponsePromise extends io.atlassian.util.concurrent.Promise<Response>
A specific type of Promise for transforming a promise with a response into another object with functions for different HTTP codes and situations
  • Nested Class Summary

    Nested classes/interfaces inherited from interface Future

    Future.State

    Nested classes/interfaces inherited from interface io.atlassian.util.concurrent.Promise

    io.atlassian.util.concurrent.Promise.TryConsumer<A>
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> io.atlassian.util.concurrent.Promise<T>
    transform(ResponseTransformation<T> transformation)
    Helps transforming this response promise into a new promise using Function to transform response into a new T.

    Methods inherited from interface Future

    cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, state

    Methods inherited from interface io.atlassian.util.concurrent.Promise

    claim, done, fail, flatMap, fold, map, recover, then
  • Method Details

    • transform

      <T> io.atlassian.util.concurrent.Promise<T> transform(ResponseTransformation<T> transformation)
      Helps transforming this response promise into a new promise using Function to transform response into a new T.
      Type Parameters:
      T - the type of the expected object once transformed.
      Returns:
      a Promise