Package com.helger.phase4.dump
Interface IAS4IncomingDumper
- All Known Implementing Classes:
AbstractAS4IncomingDumperWithHeaders,AS4IncomingDumperFileBased,AS4IncomingDumperSingleUse
public interface IAS4IncomingDumper
Interface for dumping incoming requests
- Since:
- 0.9.0
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidonEndRequest(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @Nullable Exception aCaughtException) Called after the AS4 request is handled internally.@Nullable OutputStreamonNewRequest(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaderMap) Called for new incoming AS4 requests.
-
Method Details
-
onNewRequest
@Nullable OutputStream onNewRequest(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @NonNull com.helger.http.header.HttpHeaderMap aHttpHeaderMap) throws IOException Called for new incoming AS4 requests. It's the responsibility of the caller to close the created output stream.- Parameters:
aIncomingMessageMetadata- 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. The OutputStream must be closed by the caller. - Throws:
IOException- in case of an error- Since:
- v0.9.6 the parameter changed from HttpServletRequest to
HttpHeaderMap
-
onEndRequest
void onEndRequest(@NonNull IAS4IncomingMessageMetadata aIncomingMessageMetadata, @Nullable Exception aCaughtException) Called after the AS4 request is handled internally. Can e.g. be used to cleanup resources belonging to the message. This method may not throw an exception. Since 1.3.0 this method is only called, ifonNewRequest(IAS4IncomingMessageMetadata, HttpHeaderMap)returned non-null.- Parameters:
aIncomingMessageMetadata- Message metadata. Nevernull.aCaughtException- An eventually caught exception.- Since:
- v0.9.9
-