Package com.xceptance.xlt.api.util
Class ResponseContentProcessor
java.lang.Object
com.xceptance.xlt.api.util.AbstractResponseProcessor
com.xceptance.xlt.api.util.ResponseContentProcessor
- All Implemented Interfaces:
ResponseProcessor
A
ResponseProcessor implementation, which modifies the body of a web response based on regular expressions.-
Constructor Summary
ConstructorsConstructorDescriptionResponseContentProcessor(String contentPattern, String replacement) Creates a newResponseContentProcessorobject.ResponseContentProcessor(String contentPattern, String replacement, String urlPattern) Creates a newResponseContentProcessorobject.ResponseContentProcessor(Pattern contentPattern, String replacement) Creates a newResponseContentProcessorobject.ResponseContentProcessor(Pattern contentPattern, String replacement, Pattern urlPattern) Creates a newResponseContentProcessorobject. -
Method Summary
Modifier and TypeMethodDescriptionprocessResponse(WebResponse webResponse) Processes the content of a response.Methods inherited from class com.xceptance.xlt.api.util.AbstractResponseProcessor
createWebResponse, createWebResponse
-
Constructor Details
-
ResponseContentProcessor
Creates a newResponseContentProcessorobject.- Parameters:
contentPattern- a regex specifying the piece of content to be replacedreplacement- the replacement string
-
ResponseContentProcessor
Creates a newResponseContentProcessorobject.- Parameters:
contentPattern- a regex specifying the piece of content to be replacedreplacement- the replacement stringurlPattern- a regex specifying the URL(s) for which to apply the replacement
-
ResponseContentProcessor
Creates a newResponseContentProcessorobject.- Parameters:
contentPattern- a regex specifying the piece of content to be replacedreplacement- the replacement string
-
ResponseContentProcessor
Creates a newResponseContentProcessorobject.- Parameters:
contentPattern- a regex specifying the piece of content to be replacedreplacement- the replacement stringurlPattern- a regex specifying the URL(s) for which to apply the replacement
-
-
Method Details
-
processResponse
Processes the content of a response.- Parameters:
webResponse- the web response to modify- Returns:
- the (potentially) modified web response
-