Package com.helger.phase4.dump
Class AS4IncomingDumperFileBased
java.lang.Object
com.helger.phase4.dump.AbstractAS4IncomingDumperWithHeaders<AS4IncomingDumperFileBased>
com.helger.phase4.dump.AS4IncomingDumperFileBased
- All Implemented Interfaces:
com.helger.commons.traits.IGenericImplTrait<AS4IncomingDumperFileBased>,IAS4IncomingDumper
public class AS4IncomingDumperFileBased
extends AbstractAS4IncomingDumperWithHeaders<AS4IncomingDumperFileBased>
Simple file based version of
IAS4IncomingDumper.- Since:
- 0.9.3
- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default relative path for incoming messages.Fields inherited from class com.helger.phase4.dump.AbstractAS4IncomingDumperWithHeaders
DEFAULT_INCLUDE_HEADERS -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AS4IncomingDumperFileBased(IAS4IncomingDumperFileProvider aFileProvider) Constructor with a custom file provider. -
Method Summary
Modifier and TypeMethodDescriptionstatic AS4IncomingDumperFileBasedcreateForDirectory(File aBaseDirectory) Create a new instance for the provided directory.protected OutputStreamopenOutputStream(IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) Create the output stream to which the data should be dumped.Methods inherited from class com.helger.phase4.dump.AbstractAS4IncomingDumperWithHeaders
isIncludeHeaders, onEndRequest, onNewRequest, setIncludeHeadersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsT
-
Field Details
-
DEFAULT_BASE_PATH
The default relative path for incoming messages.- See Also:
-
-
Constructor Details
-
AS4IncomingDumperFileBased
public AS4IncomingDumperFileBased()Default constructor. Writes the files to the AS4 configured data path +DEFAULT_BASE_PATH.- See Also:
-
AS4IncomingDumperFileBased
Constructor with a custom file provider.- Parameters:
aFileProvider- The file provider that defines where to store the files. May not benull.
-
-
Method Details
-
openOutputStream
@Nullable protected OutputStream openOutputStream(@Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) throws IOException Description copied from class:AbstractAS4IncomingDumperWithHeadersCreate the output stream to which the data should be dumped.- Specified by:
openOutputStreamin classAbstractAS4IncomingDumperWithHeaders<AS4IncomingDumperFileBased>- Parameters:
aMessageMetadata- Request metadata. Nevernull. Since v0.9.8.aHttpHeaderMap- The HTTP headers of the incoming message. Nevernull.- Returns:
- The output stream to dump to or
nullif no dumping should be performed. - Throws:
IOException- On IO error
-
createForDirectory
Create a new instance for the provided directory.- Parameters:
aBaseDirectory- The absolute directory to be used. May not benull.- Returns:
- The created dumper. Never
null. - Since:
- 0.10.2
-