Package com.helger.phase4.dump
Class AS4OutgoingDumperSingleUse
java.lang.Object
com.helger.phase4.dump.AbstractAS4OutgoingDumperWithHeaders
com.helger.phase4.dump.AS4OutgoingDumperSingleUse
- All Implemented Interfaces:
IAS4OutgoingDumper
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
-
Field Summary
Fields inherited from class com.helger.phase4.dump.AbstractAS4OutgoingDumperWithHeaders
DEFAULT_INCLUDE_HEADERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final OutputStreamprotected OutputStreamopenOutputStream(EAS4MessageMode eMsgMode, IAS4IncomingMessageMetadata aMessageMetadata, IAS4MessageState aState, String sMessageID, com.helger.commons.http.HttpHeaderMap aCustomHeaders, int nTry) Create the output stream to which the data should be dumped.Methods inherited from class com.helger.phase4.dump.AbstractAS4OutgoingDumperWithHeaders
isIncludeHeaders, onBeginRequest, setIncludeHeadersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.phase4.dump.IAS4OutgoingDumper
onEndRequest
-
Constructor Details
-
AS4OutgoingDumperSingleUse
-
-
Method Details
-
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:AbstractAS4OutgoingDumperWithHeadersCreate the output stream to which the data should be dumped.- Specified by:
openOutputStreamin classAbstractAS4OutgoingDumperWithHeaders- Parameters:
eMsgMode- Are we dumping a request or a response? Nevernull. Added in v1.2.0.aMessageMetadata- The incoming message metadata. This is alwaysnullfor requests. This is always non-nullfor responses. Added in v1.2.0.aState- The incoming message processing state. This is alwaysnullfor requests. This is always non-nullfor responses. Added in v1.2.0.sMessageID- The AS4 message ID of the outgoing message. Neithernullnor empty.aCustomHeaders- The HTTP headers of the outgoing message. Nevernull.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
nullif no dumping should be performed. - Throws:
IOException- On IO error
-