Class RegExReplaceInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.RegExReplaceInterceptor
- All Implemented Interfaces:
Interceptor
- Description
- Runs a regular-expression-replacement on either the message body (default) or all header values.
- Topic
- 4. Interceptors/Features
-
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 TypeMethodDescriptiongetRegex()handleRequest(Exchange exc) handleResponse(Exchange exc) voidvoidsetReplace(String replace) voidMethods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, handleAbort, init, init, setDisplayName, setFlow
-
Constructor Details
-
RegExReplaceInterceptor
public RegExReplaceInterceptor()
-
-
Method Details
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
getRegex
-
setRegex
- Description
- Regex to match against the body.
- Example
- Hallo
-
getReplace
-
setReplace
- Description
- String used to replace matched parts.
- Example
- Hello
-
getTarget
-
setTarget
- Default
- body
- Description
- Whether the replacement should affect the message body or the header values. Possible values are body and header.
- Example
- header
-