Class AS4OutgoingDumperFileBased

java.lang.Object
com.helger.phase4.dump.AbstractAS4OutgoingDumperWithHeaders
com.helger.phase4.dump.AS4OutgoingDumperFileBased
All Implemented Interfaces:
IAS4OutgoingDumper

public class AS4OutgoingDumperFileBased extends AbstractAS4OutgoingDumperWithHeaders
File based implementation of IAS4OutgoingDumper. Was moved to this package from com.helger.phase4.servlet.dump in v1.3.0.
Since:
0.9.3
Author:
Philip Helger
  • Field Details

    • DEFAULT_BASE_PATH

      public static final String DEFAULT_BASE_PATH
      The default relative path for outgoing messages.
      See Also:
  • Constructor Details

  • Method Details

    • getFileProvider

      @Nonnull protected final AS4OutgoingDumperFileBased.IFileProvider getFileProvider()
    • openOutputStream

      protected OutputStream openOutputStream(@Nonnull EAS4MessageMode eMsgMode, @Nullable IAS4IncomingMessageMetadata aMessageMetadata, @Nullable IAS4MessageState aState, @Nonnull @Nonempty String sMessageID, @Nullable com.helger.commons.http.HttpHeaderMap aCustomHeaders, @Nonnegative int nTry) throws IOException
      Description copied from class: AbstractAS4OutgoingDumperWithHeaders
      Create the output stream to which the data should be dumped.
      Specified by:
      openOutputStream in class AbstractAS4OutgoingDumperWithHeaders
      Parameters:
      eMsgMode - Are we dumping a request or a response? Never null. Added in v1.2.0.
      aMessageMetadata - The incoming message metadata. This is always null for requests. This is always non-null for responses. Added in v1.2.0.
      aState - The incoming message processing state. This is always null for requests. This is always non-null for responses. Added in v1.2.0.
      sMessageID - The AS4 message ID of the outgoing message. Neither null nor empty.
      aCustomHeaders - The HTTP headers of the outgoing message. Never null.
      nTry - The index of the try. The first try has always index 0, the first retry has index 1, the second retry has index 2 etc. Always ≥ 0.
      Returns:
      The output stream to dump to or null if no dumping should be performed.
      Throws:
      IOException - On IO error
    • createForDirectory

      @Nonnull public static AS4OutgoingDumperFileBased createForDirectory(@Nonnull File aBaseDirectory)
      Create a new instance for the provided directory.
      Parameters:
      aBaseDirectory - The absolute directory to be used. May not be null.
      Returns:
      The created dumper. Never null.
      Since:
      0.10.2