public class LimitInterceptor extends AbstractInterceptor
Note that due to the streaming nature of Membrane, a request header may already have been passed on to the backend, when the condition "body.length > X" becomes true. In this case, further processing is aborted and the connection to the backend is simply closed.
To apply <limit/> only to either requests or responses, wrap it in a corresponding tag: <request><limit ... /></request>.
| Modifier and Type | Class and Description |
|---|---|
class |
LimitInterceptor.LengthLimitingStream |
Interceptor.Flowid, name, router| Constructor and Description |
|---|
LimitInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
long |
getMaxBodyLength() |
String |
getShortDescription() |
Outcome |
handleRequest(Exchange exc) |
Outcome |
handleResponse(Exchange exc) |
void |
setMaxBodyLength(long maxBodyLength) |
getDisplayName, getFlow, getHelpId, getId, getLongDescription, getRouter, getRule, handleAbort, init, init, setDisplayName, setFlow, setIdpublic Outcome handleRequest(Exchange exc) throws Exception
handleRequest in interface InterceptorhandleRequest in class AbstractInterceptorExceptionpublic Outcome handleResponse(Exchange exc) throws Exception
handleResponse in interface InterceptorhandleResponse in class AbstractInterceptorExceptionpublic String getShortDescription()
getShortDescription in interface InterceptorgetShortDescription in class AbstractInterceptorpublic long getMaxBodyLength()
public void setMaxBodyLength(long maxBodyLength)
Copyright © 2022. All Rights Reserved.