Interface CallResults


public interface CallResults

Represents the results of a call to a Adobe Campaign instance.

Instances of this class are considered to be consumed by a single thread, so the implementation should not be considered threadsafe.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the body of the response as a stream.
    Returns the body of the response as a String.
    void
    Should be called after the results have been completely consumed by the client to ensure resources are properly cleaned up
    Returns the complete URL of the originating request (debugging purposes only!).
    Retrieve a Map of the response headers.
    int
    Returns the (HTTP-) status of the call.
  • Method Details

    • getStatus

      int getStatus()
      Returns the (HTTP-) status of the call.
      Returns:
      The (HTTP-) status
    • getResponseHeaders

      Map<String,String> getResponseHeaders()
      Retrieve a Map of the response headers.
      Returns:
      The response headers
    • bodyAsStream

      InputStream bodyAsStream() throws IOException

      Returns the body of the response as a stream.

      Caller is responsible for closing the stream.

      Returns:
      The stream to access the body of the response
      Throws:
      IOException
    • bodyAsString

      String bodyAsString() throws IOException
      Returns the body of the response as a String.
      Returns:
      The body of the response
      Throws:
      IOException
    • destroy

      void destroy()
      Should be called after the results have been completely consumed by the client to ensure resources are properly cleaned up
    • getCompleteURL

      String getCompleteURL()
      Returns the complete URL of the originating request (debugging purposes only!).
      Returns:
      The complete URL