Package com.helger.as2lib.util.dump
Interface IHTTPOutgoingDumper
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
HTTPOutgoingDumperFileBased
,HTTPOutgoingDumperStreamBased
Base interface to dump outgoing HTTP requests
- Since:
- 3.1.0 - totally redesigned
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Close the dumper.void
dumpHeader
(String sName, String sValue) Get notified on a single outgoing HTTP headers.void
dumpPayload
(byte[] aBytes, int nOfs, int nLen) Dump a single payload byte.void
dumpPayload
(int nByte) Dump a single payload byte.default void
Called after all headers were emitted.default void
Called after the payload was emitted.default com.helger.commons.io.stream.WrappedOutputStream
getDumpOS
(OutputStream aBaseOS) default void
start
(String sUrl, AS2Message aMsg) Called when a new outgoing connection is initiated.
-
Method Details
-
start
Called when a new outgoing connection is initiated.- Parameters:
sUrl
- The URL to which a connection is established.aMsg
- The message to be dumped. Nevernull
.- Since:
- 4.4.0
-
dumpHeader
Get notified on a single outgoing HTTP headers. For HTTP headers usually the ISO-8859-1 charset is used.- Parameters:
sName
- HTTP header name. Nevernull
.sValue
- HTTP header value. Nevernull
.
-
finishedHeaders
default void finishedHeaders()Called after all headers were emitted. -
dumpPayload
void dumpPayload(int nByte) Dump a single payload byte. May not throw an IOException!- Parameters:
nByte
- Current byte
-
dumpPayload
Dump a single payload byte. May not throw an IOException!- Parameters:
aBytes
- bytesnOfs
- Offset into the arraynLen
- Number of bytes to write- Since:
- 4.2.0
-
finishedPayload
default void finishedPayload()Called after the payload was emitted. -
close
Close the dumper.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
getDumpOS
@Nonnull default com.helger.commons.io.stream.WrappedOutputStream getDumpOS(@Nonnull OutputStream aBaseOS)
-