com.atlassian.httpclient.api
Interface ResponsePromise

All Superinterfaces:
java.util.concurrent.Future<Response>, com.google.common.util.concurrent.ListenableFuture<Response>, com.atlassian.util.concurrent.Promise<Response>

public interface ResponsePromise
extends com.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


Method Summary
<T> ResponseTransformation<T>
transform()
          Helps transforming this response promise into a new promise using Function to transform response into a new T.
 
Methods inherited from interface com.atlassian.util.concurrent.Promise
claim, done, fail, flatMap, fold, map, recover, then
 
Methods inherited from interface com.google.common.util.concurrent.ListenableFuture
addListener
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

transform

<T> ResponseTransformation<T> transform()
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 com.atlassian.util.concurrent.Promise


Copyright © 2012-2013 Atlassian. All Rights Reserved.