com.atlassian.httpclient.api
Class ResponsePromises

java.lang.Object
  extended by com.atlassian.httpclient.api.ResponsePromises

public final class ResponsePromises
extends java.lang.Object

Helper methods for working with response promises


Method Summary
static ResponsesPromise toResponsePromise(com.google.common.util.concurrent.ListenableFuture<java.util.List<Response>> future)
           
static ResponsePromise toResponsePromise(com.google.common.util.concurrent.ListenableFuture<Response> future)
           
static ResponsesPromise when(java.lang.Iterable<? extends ResponsePromise> promises)
          Returns a new promise representing the status of a list of other promises.
static ResponsesPromise when(ResponsePromise... promises)
          Returns a new promise representing the status of a list of other promises.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

when

public static ResponsesPromise when(ResponsePromise... promises)
Returns a new promise representing the status of a list of other promises. Status code or status code range callbacks only fire if all responses match.

Parameters:
promises - The promises that the new promise should track
Returns:
The new, aggregate promise

when

public static ResponsesPromise when(java.lang.Iterable<? extends ResponsePromise> promises)
Returns a new promise representing the status of a list of other promises. Status code or status code range callbacks only fire if all responses match.

Parameters:
promises - The promises that the new promise should track
Returns:
The new, aggregate promise

toResponsePromise

public static ResponsePromise toResponsePromise(com.google.common.util.concurrent.ListenableFuture<Response> future)

toResponsePromise

public static ResponsesPromise toResponsePromise(com.google.common.util.concurrent.ListenableFuture<java.util.List<Response>> future)


Copyright © 2012 Atlassian. All Rights Reserved.