com.github.kristofa.test.http.file
Class HttpRequestResponseFileLoggerFactory

java.lang.Object
  extended by com.github.kristofa.test.http.file.HttpRequestResponseFileLoggerFactory
All Implemented Interfaces:
HttpRequestResponseLoggerFactory

public class HttpRequestResponseFileLoggerFactory
extends Object
implements HttpRequestResponseLoggerFactory

Factory that creates HttpRequestResponseFileLogger instances.

Author:
kristof
See Also:
HttpRequestResponseFileLogger, LoggingHttpProxy

Constructor Summary
HttpRequestResponseFileLoggerFactory(String directory, String fileName)
          Creates a new instance.
 
Method Summary
 HttpRequestResponseLogger getHttpRequestResponseLogger()
          Creates a new HttpRequestResponseLogger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestResponseFileLoggerFactory

public HttpRequestResponseFileLoggerFactory(String directory,
                                            String fileName)
Creates a new instance.

Parameters:
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.
Method Detail

getHttpRequestResponseLogger

public HttpRequestResponseLogger getHttpRequestResponseLogger()
Creates a new HttpRequestResponseLogger. Each request should return a new instance.

Specified by:
getHttpRequestResponseLogger in interface HttpRequestResponseLoggerFactory
Returns:
a New HttpRequestResponseLogger.


Copyright © 2014. All Rights Reserved.