Package com.helger.phase4.dump
Class AbstractAS4IncomingDumperWithHeaders
java.lang.Object
com.helger.phase4.dump.AbstractAS4IncomingDumperWithHeaders
- All Implemented Interfaces:
IAS4IncomingDumper
- Direct Known Subclasses:
AS4IncomingDumperFileBased,AS4IncomingDumperSingleUse
public abstract class AbstractAS4IncomingDumperWithHeaders
extends Object
implements IAS4IncomingDumper
Abstract version of
IAS4IncomingDumper that emits all headers on the
output stream.- Since:
- 0.9.7
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononNewRequest(IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) Called for new requests.protected abstract OutputStreamopenOutputStream(IAS4IncomingMessageMetadata aMessageMetadata, com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) Create the output stream to which the data should be dumped.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.phase4.dump.IAS4IncomingDumper
onEndRequest
-
Constructor Details
-
AbstractAS4IncomingDumperWithHeaders
public AbstractAS4IncomingDumperWithHeaders()
-
-
Method Details
-
openOutputStream
@Nullable protected abstract OutputStream openOutputStream(@Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) throws IOException Create the output stream to which the data should be dumped.- Parameters:
aMessageMetadata- Request metadata. Nevernull. Since v0.9.8.aHttpHeaderMap- The HTTP headers of the incoming message. Nevernull.- Returns:
- The output stream to dump to or
nullif no dumping should be performed. - Throws:
IOException- On IO error
-
onNewRequest
@Nullable public OutputStream onNewRequest(@Nonnull IAS4IncomingMessageMetadata aMessageMetadata, @Nonnull com.helger.commons.http.HttpHeaderMap aHttpHeaderMap) throws IOException Description copied from interface:IAS4IncomingDumperCalled for new requests. It's the responsibility of the caller to close the created output stream.- Specified by:
onNewRequestin interfaceIAS4IncomingDumper- Parameters:
aMessageMetadata- Message metadata. Nevernull. Since v0.9.8.aHttpHeaderMap- The HTTP headers of the request. Nevernull.- Returns:
- If
nullis returned, nothing is dumped, else each byte read from the source stream is written to that output stream. - Throws:
IOException- in case of an error
-