Class AS4OutgoingDumperSingleUse

All Implemented Interfaces:
com.helger.base.trait.IGenericImplTrait<AS4OutgoingDumperSingleUse>, IAS4OutgoingDumper

public class AS4OutgoingDumperSingleUse extends AbstractAS4OutgoingDumperWithHeaders<AS4OutgoingDumperSingleUse>
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

    • AS4OutgoingDumperSingleUse

      public AS4OutgoingDumperSingleUse(@WillNotClose @NonNull OutputStream aOS)
  • Method Details

    • getOutputStream

      protected final @NonNull OutputStream getOutputStream()
    • openOutputStream

      protected OutputStream openOutputStream(@NonNull EAS4MessageMode eMsgMode, @Nullable IAS4IncomingMessageMetadata aIncomingMessageMetadata, @Nullable IAS4IncomingMessageState aIncomingState, @Nonempty @NonNull @Nonempty String sMessageID, @Nullable com.helger.http.header.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<AS4OutgoingDumperSingleUse>
      Parameters:
      eMsgMode - Are we dumping a request or a response? Never null. Added in v1.2.0.
      aIncomingMessageMetadata - The incoming message metadata. This is always null for requests. This is always non-null for responses. Added in v1.2.0.
      aIncomingState - 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