public static interface ResponseTransformation.Builder<T> extends Buildable<ResponseTransformation<T>>
| Modifier and Type | Method and Description |
|---|---|
ResponseTransformation.Builder<T> |
badRequest(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'bad request' (400) HTTP responses.
|
ResponseTransformation.Builder<T> |
clientError(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'client error' (4xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
conflict(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'conflict' (409) HTTP responses.
|
ResponseTransformation.Builder<T> |
created(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'created' (201) HTTP responses.
|
ResponseTransformation.Builder<T> |
done(com.google.common.base.Function<Response,T> f)
Register a function to transform all completed (1xx, 2xx, 3xx, 4xx, and 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
error(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform all error (4xx and 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
fail(com.google.common.base.Function<Throwable,? extends T> f)
Register a function to transform exceptions thrown while executing the HTTP request.
|
ResponseTransformation.Builder<T> |
forbidden(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'forbidden' (403) HTTP responses.
|
ResponseTransformation.Builder<T> |
informational(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'informational' (1xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
internalServerError(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'internal server error' (500) HTTP responses.
|
ResponseTransformation.Builder<T> |
noContent(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'no content' (204) HTTP responses.
|
ResponseTransformation.Builder<T> |
notFound(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'not found' (404) HTTP responses.
|
ResponseTransformation.Builder<T> |
notModified(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'not modified' (304) HTTP responses.
|
ResponseTransformation.Builder<T> |
notSuccessful(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform all non-'successful' (1xx, 3xx, 4xx, 5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
ok(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'ok' (200) HTTP responses.
|
ResponseTransformation.Builder<T> |
on(HttpStatus status,
com.google.common.base.Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status.
|
ResponseTransformation.Builder<T> |
on(int statusCode,
com.google.common.base.Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status code.
|
ResponseTransformation.Builder<T> |
others(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform all other HTTP responses (i.e.
|
ResponseTransformation.Builder<T> |
otherwise(com.google.common.base.Function<Throwable,T> f)
Register a function to transform both of the following events:
Any value passed to
fail()
Any value passed to others(), converted into an exception
|
ResponseTransformation.Builder<T> |
redirection(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'redirection' (3xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
seeOther(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'see other' (303) HTTP responses.
|
ResponseTransformation.Builder<T> |
serverError(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'server error' (5xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
serviceUnavailable(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'service unavailable' (503) HTTP responses.
|
ResponseTransformation.Builder<T> |
successful(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'successful' (2xx) HTTP responses.
|
ResponseTransformation.Builder<T> |
unauthorized(com.google.common.base.Function<Response,? extends T> f)
Register a function to transform 'unauthorized' (401) HTTP responses.
|
ResponseTransformation.Builder<T> on(HttpStatus status, com.google.common.base.Function<Response,? extends T> f)
status - The HTTP status to select onf - The transformation functionon(int, com.google.common.base.Function)ResponseTransformation.Builder<T> on(int statusCode, com.google.common.base.Function<Response,? extends T> f)
Register a function to transform HTTP responses with a specific status code. Use this as a fallback if the status code you're interested in does not have a more explicit registration method for it.
Prefer the on(HttpStatus, com.google.common.base.Function) method if you're using standard
HTTP status.
statusCode - The code to select onf - The transformation functionon(HttpStatus, com.google.common.base.Function)ResponseTransformation.Builder<T> informational(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> successful(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> ok(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> created(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> noContent(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> redirection(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> seeOther(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notModified(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> clientError(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> badRequest(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> unauthorized(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> forbidden(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notFound(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> conflict(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> serverError(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> internalServerError(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> serviceUnavailable(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> error(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> notSuccessful(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> others(com.google.common.base.Function<Response,? extends T> f)
f - The transformation functionResponseTransformation.Builder<T> otherwise(com.google.common.base.Function<Throwable,T> f)
fail()f - The transformation functionResponseTransformation.Builder<T> done(com.google.common.base.Function<Response,T> f)
f - The transformation functionResponseTransformation.Builder<T> fail(com.google.common.base.Function<Throwable,? extends T> f)
f - The transformation functionCopyright © 2012–2018 Atlassian. All rights reserved.