Class ConditionalInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.flow.AbstractFlowInterceptor
com.predic8.membrane.core.interceptor.flow.ConditionalInterceptor
- All Implemented Interfaces:
Interceptor
- Description
The "if" interceptor supports conditional execution of a group of executors.
Note that this is a draft implementation only: Design decisions are still pending.
- 'evaluate condition only once': Should the condition be reevaluated once response handling has begun?
- 'evaluate condition always during request handling already' (even when 'if' is nested in 'response')
- What happens to ABORT handling of interceptor A in
<request><if test="..."><A /></if></response>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTest()handleRequest(Exchange exc) handleResponse(Exchange exc) voidvoidvoidMethods inherited from class com.predic8.membrane.core.interceptor.flow.AbstractFlowInterceptor
getInterceptors, setInterceptorsMethods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, handleAbort, init, setDisplayName, setFlow
-
Constructor Details
-
ConditionalInterceptor
public ConditionalInterceptor()
-
-
Method Details
-
init
- Specified by:
initin interfaceInterceptor- Overrides:
initin classAbstractFlowInterceptor- Throws:
Exception
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
getLanguage
-
setLanguage
- Default
- groovy
- Description
- the language of the 'test' condition
- Example
- SpEL, groovy
-
getTest
-
setTest
- Description
- the condition to be tested
- Example
- exc.request.header.userAgentSupportsSNI
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-