Class AS4OutgoingDumperSingleUse

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

public class AS4OutgoingDumperSingleUse extends AbstractAS4OutgoingDumperWithHeaders
A simple IAS4OutgoingDumper that can be used for a single transmission and dumps it to the OutputStream provided in the constructor. As there are can be retries for outgoing messages, only the first try is logged and consecutive calls don't result in dump.
Since:
0.9.8
Author:
Philip Helger
  • Constructor Details

  • Method Details

    • getOutputStream

      @Nonnull protected final OutputStream getOutputStream()
    • 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