Interface IHTTPOutgoingDumper

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
HTTPOutgoingDumperFileBased, HTTPOutgoingDumperStreamBased

public interface IHTTPOutgoingDumper extends AutoCloseable
Base interface to dump outgoing HTTP requests
Since:
3.1.0 - totally redesigned
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    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
     
    default void
    start(String sUrl, AS2Message aMsg)
    Called when a new outgoing connection is initiated.
  • Method Details

    • start

      default void start(@Nonnull String sUrl, @Nonnull AS2Message aMsg)
      Called when a new outgoing connection is initiated.
      Parameters:
      sUrl - The URL to which a connection is established.
      aMsg - The message to be dumped. Never null.
      Since:
      4.4.0
    • dumpHeader

      void dumpHeader(@Nonnull String sName, @Nonnull String sValue)
      Get notified on a single outgoing HTTP headers. For HTTP headers usually the ISO-8859-1 charset is used.
      Parameters:
      sName - HTTP header name. Never null.
      sValue - HTTP header value. Never null.
    • 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

      void dumpPayload(@Nonnull byte[] aBytes, @Nonnegative int nOfs, @Nonnegative int nLen)
      Dump a single payload byte. May not throw an IOException!
      Parameters:
      aBytes - bytes
      nOfs - Offset into the array
      nLen - Number of bytes to write
      Since:
      4.2.0
    • finishedPayload

      default void finishedPayload()
      Called after the payload was emitted.
    • close

      default void close() throws IOException
      Close the dumper.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • getDumpOS

      @Nonnull default com.helger.commons.io.stream.WrappedOutputStream getDumpOS(@Nonnull OutputStream aBaseOS)