Package com.helger.phase4.dump
Class AS4DumpManager
java.lang.Object
com.helger.phase4.dump.AS4DumpManager
This class holds the global stream dumpers.
- Since:
- 0.9.0
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull InputStreamgetIncomingDumpAwareInputStream(@Nullable IAS4IncomingDumper aIncomingDumper, @NonNull InputStream aRequestInputStream, @NonNull IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaders, @NonNull com.helger.base.wrapper.Wrapper<OutputStream> aDumpOSHolder) static @Nullable IAS4IncomingDumperstatic @Nullable IAS4OutgoingDumperstatic voidsetIncomingDumper(@Nullable IAS4IncomingDumper aIncomingDumper) Set the incoming dumper to be globally used.static voidsetOutgoingDumper(@Nullable 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
public static @NonNull InputStream getIncomingDumpAwareInputStream(@Nullable IAS4IncomingDumper aIncomingDumper, @WillNotClose @NonNull InputStream aRequestInputStream, @NonNull IAS4IncomingMessageMetadata aMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaders, @NonNull com.helger.base.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. Do not close the received OutputStream, that is done internally automatically.- Returns:
- the InputStream to be used. The caller is responsible for closing the stream. Never
null. - Throws:
IOException- In case of IO error
-