TestProxyRecordPolicy Class
- java.
lang. Object - com.
azure. core. test. policy. TestProxyRecordPolicy
- com.
Implements
public class TestProxyRecordPolicy
implements HttpPipelinePolicy
A HttpPipelinePolicy for redirecting traffic through the test proxy for recording.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final String | RECORD_MODE |
Constructor Summary
Constructor | Description |
---|---|
TestProxyRecordPolicy(HttpClient httpClient, boolean skipRecordingRequestBody) |
Create an instance of TestProxyRecordPolicy with a list of custom sanitizers. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addProxySanitization(List<TestProxySanitizer> sanitizers)
Add a list of TestProxySanitizer to the current recording session. |
Mono<Http |
process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) |
Http |
processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next) |
void |
removeProxySanitization(List<String> sanitizers)
Removes the list of sanitizers from the current playback session. |
void |
setRecordingOptions(TestProxyRecordingOptions testProxyRecordingOptions)
Set transport layer test proxy recording options |
void |
startRecording(File recordFile, Path testClassPath)
Starts a recording of test traffic. |
void |
stopRecording(Queue<String> variables)
Stops recording of test traffic. |
Methods inherited from java.lang.Object
Field Details
RECORD_MODE
public static final String RECORD_MODE
Constructor Details
TestProxyRecordPolicy
public TestProxyRecordPolicy(HttpClient httpClient, boolean skipRecordingRequestBody)
Create an instance of TestProxyRecordPolicy with a list of custom sanitizers.
Parameters:
Method Details
addProxySanitization
public void addProxySanitization(List
Add a list of TestProxySanitizer to the current recording session.
Parameters:
process
public Mono
Parameters:
processSync
public HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)
Parameters:
removeProxySanitization
public void removeProxySanitization(List
Removes the list of sanitizers from the current playback session.
Parameters:
setRecordingOptions
public void setRecordingOptions(TestProxyRecordingOptions testProxyRecordingOptions)
Set transport layer test proxy recording options
Parameters:
startRecording
public void startRecording(File recordFile, Path testClassPath)
Starts a recording of test traffic.
Parameters:
stopRecording
public void stopRecording(Queue
Stops recording of test traffic.
Parameters:
Applies to
Azure SDK for Java