public class PreconditionHttpResponseInterceptorDelegate extends Object implements HttpResponseInterceptor
HttpResponseInterceptor implementation that applies a precondition and if satisfied and the delegate matches too it
delegates the execution to a nested HttpResponseInterceptor.
This is useful when grouping HttpResponseInterceptors by a precondition like: statusCode == 200| Modifier and Type | Class and Description |
|---|---|
static interface |
PreconditionHttpResponseInterceptorDelegate.Matcher
Defines a predicate condition.
|
| Constructor and Description |
|---|
PreconditionHttpResponseInterceptorDelegate(PreconditionHttpResponseInterceptorDelegate.Matcher precondition,
HttpResponseInterceptor delegate) |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.http.api.domain.message.response.HttpResponse |
intercept(HttpRequest httpRequest,
org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse)
Process an
HttpResponse and generate a new one or return the one provided. |
public PreconditionHttpResponseInterceptorDelegate(PreconditionHttpResponseInterceptorDelegate.Matcher precondition, HttpResponseInterceptor delegate)
public org.mule.runtime.http.api.domain.message.response.HttpResponse intercept(HttpRequest httpRequest, org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse)
HttpResponseInterceptorHttpResponse and generate a new one or return the one provided.intercept in interface HttpResponseInterceptorhttpRequest - the HTTP request that was executed against the server.httpResponse - the server response to be intercepted. Entity's content could not be read more than once, so
implementations should address this when content needs to be accessed more than once.HttpResponse.Copyright © 2023. All rights reserved.