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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.InputStream bodyAsStream()
      Returns the body of the response as a stream.
      java.lang.String bodyAsString()
      Returns the body of the response as a String.
      void destroy()
      Should be called after the results have been completely consumed by the client to ensure resources are properly cleaned up
      java.lang.String getCompleteURL()
      Returns the complete URL of the originating request (debugging purposes only!).
      java.util.Map<java.lang.String,​java.lang.String> getResponseHeaders()
      Retrieve a Map of the response headers.
      int getStatus()
      Returns the (HTTP-) status of the call.
    • Method Detail

      • getStatus

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

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

        java.io.InputStream bodyAsStream()
                                  throws java.io.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:
        java.io.IOException
      • bodyAsString

        java.lang.String bodyAsString()
                               throws java.io.IOException
        Returns the body of the response as a String.
        Returns:
        The body of the response
        Throws:
        java.io.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

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