public class CompositeResponseAccessor extends java.lang.Object implements HttpResponseAccessor
HttpResponseAccessor
.
Composes several instances HttpResponseAccessor
instances
and provides access to the HTTP response for each of them.
Per HttpResponseAccessor.access(HttpResponse)
none of the
instances is supposed to throw a RuntimeException
. In case some
of them do, the rest of the composed instances will not be provided with
the HTTP response.
Constructor and Description |
---|
CompositeResponseAccessor(HttpResponseAccessor... accessors) |
CompositeResponseAccessor(java.util.List<HttpResponseAccessor> accessors) |
Modifier and Type | Method and Description |
---|---|
void |
access(HttpResponse response)
Processes the raw HTTP response.
|
public CompositeResponseAccessor(java.util.List<HttpResponseAccessor> accessors)
public CompositeResponseAccessor(HttpResponseAccessor... accessors)
public void access(HttpResponse response)
HttpResponseAccessor
If the implementation of this method throws a RuntimeException
it will be logged and ignored, i.e. it cannot fail the response
processing.
access
in interface HttpResponseAccessor
response
- representing the raw REST/HTTP response