com.atlassian.httpclient.api
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.
getFailFunction
com.google.common.base.Function<Throwable,? extends T> getFailFunction()
getSuccessFunctions
com.google.common.base.Function<Response,T> getSuccessFunctions()
apply
com.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
Copyright © 2012–2015 Atlassian. All rights reserved.