Class AS4DumpManager

java.lang.Object
com.helger.phase4.dump.AS4DumpManager

@ThreadSafe public final class AS4DumpManager extends Object
This class holds the global stream dumper.
Since:
0.9.0
Author:
Philip Helger
  • Method Details

    • getIncomingDumper

      @Nullable public static IAS4IncomingDumper getIncomingDumper()
      Returns:
      The incoming dumper. May be null.
    • setIncomingDumper

      public static void setIncomingDumper(@Nullable IAS4IncomingDumper aIncomingDumper)
      Set the incoming dumper to be globally used.
      Parameters:
      aIncomingDumper - The new dumper. May be null.
    • getOutgoingDumper

      @Nullable public static IAS4OutgoingDumper getOutgoingDumper()
      Returns:
      The outgoing dumper. May be null.
    • setOutgoingDumper

      public static void setOutgoingDumper(@Nullable IAS4OutgoingDumper aOutgoingDumper)
      Set the outgoing dumper to be globally used.
      Parameters:
      aOutgoingDumper - The new dumper. May be null.
    • getIncomingDumpAwareInputStream

      @Nonnull public static InputStream getIncomingDumpAwareInputStream(@Nullable IAS4IncomingDumper aIncomingDumper, @Nonnull @WillNotClose InputStream aRequestInputStream, @Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaders, @Nonnull com.helger.commons.wrapper.Wrapper<OutputStream> aDumpOSHolder) throws IOException
      Parameters:
      aIncomingDumper - The incoming AS4 dumper. May be null. The caller is responsible to invoke getIncomingDumper() outside.
      aRequestInputStream - The InputStream to read the request payload from. Will not be closed internally. Never null.
      aMessageMetadata - Request metadata. Never null.
      aHttpHeaders - the HTTP headers of the current request. Never null.
      aDumpOSHolder - A wrapper that holds the debug output stream. This can be used to determine if the message should be dumped or not. Parameter was added in v1.3.0.
      Returns:
      the InputStream to be used. The caller is responsible for closing the stream. Never null.
      Throws:
      IOException - In case of IO error