public class HttpRequestResponseFileLoggerFactory extends Object implements HttpRequestResponseLoggerFactory
HttpRequestResponseFileLogger instances.HttpRequestResponseFileLogger,
LoggingHttpProxy| Constructor and Description |
|---|
HttpRequestResponseFileLoggerFactory(String directory,
String fileName)
Creates a new instance.
|
HttpRequestResponseFileLoggerFactory(String directory,
String fileName,
boolean deleteExistingFiles)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequestResponseLogger |
getHttpRequestResponseLogger()
Creates a new
HttpRequestResponseLogger. |
public HttpRequestResponseFileLoggerFactory(String directory, String fileName)
directory - Target directory in which to store request/responses. Directory should already exist. Should not be
null or blank.fileName - Base file name. Should not contain extension. Will be suffixed with sequence number and .txt
extension. Should not be null or blank.public HttpRequestResponseFileLoggerFactory(String directory, String fileName, boolean deleteExistingFiles)
directory - Target directory in which to store request/responses. Directory should already exist. Should not be
null or blank.fileName - Base file name. Should not contain extension. Will be suffixed with sequence number and .txt
extension. Should not be null or blank.deleteExistingFiles - If value is true we will delete all existing files prior to logging new
requests. This is often helpful because if we have less requests than before otherwise old files keep on
lingering which can cause failing tests.public HttpRequestResponseLogger getHttpRequestResponseLogger()
HttpRequestResponseLogger. Each request should return a new instance.getHttpRequestResponseLogger in interface HttpRequestResponseLoggerFactoryHttpRequestResponseLogger.Copyright © 2014. All Rights Reserved.