public class CompositeHttpResponseInterceptor extends Object implements HttpResponseInterceptor
HttpResponseInterceptor that executes the first matching HttpResponseInterceptor
from the List or all of them depending on the execution strategy provided.| Modifier and Type | Class and Description |
|---|---|
static class |
CompositeHttpResponseInterceptor.ExecutionStrategy
Defines if
CompositeHttpResponseInterceptor.ExecutionStrategy.ALL or CompositeHttpResponseInterceptor.ExecutionStrategy.ONLY_FIRST of the interceptors should be executed by this composition. |
| Constructor and Description |
|---|
CompositeHttpResponseInterceptor(List<HttpResponseInterceptor> httpResponseInterceptors,
CompositeHttpResponseInterceptor.ExecutionStrategy executionStrategy) |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.http.api.domain.message.response.HttpResponse |
intercept(InterceptionHttpRequest httpRequest,
org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse,
org.mule.runtime.api.el.ExpressionLanguage expressionLanguage)
Process an
HttpResponse and generate a new one or return the one provided. |
boolean |
match(InterceptionHttpRequest httpRequest,
org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse,
org.mule.runtime.api.el.ExpressionLanguage expressionLanguage)
Defines if this interceptor should process the
HttpResponse. |
public CompositeHttpResponseInterceptor(List<HttpResponseInterceptor> httpResponseInterceptors, CompositeHttpResponseInterceptor.ExecutionStrategy executionStrategy)
public boolean match(InterceptionHttpRequest httpRequest, org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse, org.mule.runtime.api.el.ExpressionLanguage expressionLanguage)
HttpResponseInterceptorHttpResponse.match in interface HttpResponseInterceptorhttpRequest - the HTTP request that was executed against the server.httpResponse - the server response to be intercepted. Entity's content could be read more than once as it is backed up *
by repeatable streaming from Mule.expressionLanguage - Mule's ExpressionLanguage to allow using expressions for resolving the interception.true the HttpResponseInterceptor.intercept(InterceptionHttpRequest, HttpResponse, ExpressionLanguage) method will be
called, otherwise not.public org.mule.runtime.http.api.domain.message.response.HttpResponse intercept(InterceptionHttpRequest httpRequest, org.mule.runtime.http.api.domain.message.response.HttpResponse httpResponse, org.mule.runtime.api.el.ExpressionLanguage expressionLanguage)
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 be read more than once as it is backed up
by repeatable streaming from Mule.expressionLanguage - Mule's ExpressionLanguage to allow using expressions for resolving the interception.HttpResponse.Copyright © 2021. All rights reserved.