Package com.helger.as2lib.util.dump
Class HTTPIncomingDumperDirectoryBased
- java.lang.Object
-
- com.helger.as2lib.util.dump.HTTPIncomingDumperDirectoryBased
-
- All Implemented Interfaces:
IHTTPIncomingDumper
public class HTTPIncomingDumperDirectoryBased extends Object implements IHTTPIncomingDumper
Directory based incoming HTTP dumper.- Since:
- 3.0.1
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description HTTPIncomingDumperDirectoryBased(File aDumpDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dumpIncomingRequest(List<String> aHeaderLines, byte[] aPayload, IBaseMessage aMsg)
Dump an incoming HTTP request.File
getDumpDirectory()
protected String
getStoreFilename(int nIndex)
The filename to be used to store the request in the folder provided in the constructor.String
toString()
protected void
writeToFile(File aDestinationFile, List<String> aHeaderLines, byte[] aPayload, IBaseMessage aMsg)
-
-
-
Method Detail
-
getStoreFilename
@Nonnull protected String getStoreFilename(int nIndex)
The filename to be used to store the request in the folder provided in the constructor.- Parameters:
nIndex
- Unique index to avoid duplicate filenames- Returns:
- The local filename without any path
-
writeToFile
protected void writeToFile(@Nonnull File aDestinationFile, @Nonnull List<String> aHeaderLines, @Nonnull byte[] aPayload, @Nullable IBaseMessage aMsg)
-
dumpIncomingRequest
public void dumpIncomingRequest(@Nonnull List<String> aHeaderLines, @Nonnull byte[] aPayload, @Nullable IBaseMessage aMsg)
Description copied from interface:IHTTPIncomingDumper
Dump an incoming HTTP request.- Specified by:
dumpIncomingRequest
in interfaceIHTTPIncomingDumper
- Parameters:
aHeaderLines
- All headers lines. Use ISO-8859-1 to convert to bytes.aPayload
- The payload byte array.aMsg
- The message stub. May benull
for legacy reasons.
-
-