org.aludratest.hpalm.infrastructure
Class Response
java.lang.Object
org.aludratest.hpalm.infrastructure.Response
public class Response
- extends Object
This is a naive implementation of an HTTP response. We use it to simplify matters in the examples. It is nothing more than a
container of the response headers and the response body.
Response
public Response(Map<String,Iterable<String>> responseHeaders,
byte[] responseData,
Exception failure,
int statusCode)
Response
public Response()
getResponseHeaders
public Map<String,? extends Iterable<String>> getResponseHeaders()
- Returns:
- the responseHeaders
setResponseHeaders
public void setResponseHeaders(Map<String,? extends Iterable<String>> responseHeaders)
- Parameters:
responseHeaders - the responseHeaders to set
getResponseData
public byte[] getResponseData()
- Returns:
- the responseData
setResponseData
public void setResponseData(byte[] responseData)
- Parameters:
responseData - the responseData to set
getFailure
public Exception getFailure()
- Returns:
- the failure if the access to the requested URL failed, such as a 404 or 500. If no such failure occured this method
returns null.
setFailure
public void setFailure(Exception failure)
- Parameters:
failure - the failure to set
getStatusCode
public int getStatusCode()
- Returns:
- the statusCode
setStatusCode
public void setStatusCode(int statusCode)
- Parameters:
statusCode - the statusCode to set
toString
public String toString()
- Overrides:
toString in class Object
- See Also:
return the contents of the byte[] data as a string.
Copyright © 2015 aludratest.org. All rights reserved.