Package com.day.cq.mcm.campaign
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 aString
.void
destroy()
Should be called after the results have been completely consumed by the client to ensure resources are properly cleaned upjava.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 aMap
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 aMap
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 aString
.- 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
-
-