Package com.helger.phase4.dump
Class AS4DumpManager
java.lang.Object
com.helger.phase4.dump.AS4DumpManager
This class holds the global stream dumper.
- Since:
- 0.9.0
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamgetIncomingDumpAwareInputStream(IAS4IncomingDumper aIncomingDumper, InputStream aRequestInputStream, IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaders, com.helger.commons.wrapper.Wrapper<OutputStream> aDumpOSHolder) static IAS4IncomingDumperstatic IAS4OutgoingDumperstatic voidsetIncomingDumper(IAS4IncomingDumper aIncomingDumper) Set the incoming dumper to be globally used.static voidsetOutgoingDumper(IAS4OutgoingDumper aOutgoingDumper) Set the outgoing dumper to be globally used.
-
Method Details
-
getIncomingDumper
- Returns:
- The incoming dumper. May be
null.
-
setIncomingDumper
Set the incoming dumper to be globally used.- Parameters:
aIncomingDumper- The new dumper. May benull.
-
getOutgoingDumper
- Returns:
- The outgoing dumper. May be
null.
-
setOutgoingDumper
Set the outgoing dumper to be globally used.- Parameters:
aOutgoingDumper- The new dumper. May benull.
-
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 benull. The caller is responsible to invokegetIncomingDumper()outside.aRequestInputStream- The InputStream to read the request payload from. Will not be closed internally. Nevernull.aMessageMetadata- Request metadata. Nevernull.aHttpHeaders- the HTTP headers of the current request. Nevernull.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
-