Class EthosResponseBuilder
- java.lang.Object
-
- com.ellucian.ethos.integration.client.EthosResponseBuilder
-
- Direct Known Subclasses:
EthosResponseConverter
public class EthosResponseBuilder extends Object
Intended to be used to more easily build an EthosResponse object from the givenorg.apache.http.HttpResponse
.
-
-
Constructor Summary
Constructors Constructor Description EthosResponseBuilder()
No-arg constructor for instantiating this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EthosResponse
buildEthosResponse(org.apache.http.HttpResponse httpResponse)
Builds anEthosResponse
object from the givenorg.apache.http.HttpResponse
.
-
-
-
Method Detail
-
buildEthosResponse
public EthosResponse buildEthosResponse(org.apache.http.HttpResponse httpResponse) throws IOException
Builds anEthosResponse
object from the givenorg.apache.http.HttpResponse
. The headerList is built taking header values from the givenorg.apache.http.HttpResponse
for the headers listed inEthosResponse
. Also copies the response body content and Http status code.- Parameters:
httpResponse
- Theorg.apache.http.HttpResponse
to build anEthosResponse
from.- Returns:
- An
EthosResponse
containing the headers values from the givenorg.apache.http.HttpResponse
for the headers defined inEthosResponse
, the response body content, and the response Http status code, or null if the givenorg.apache.http.HttpResponse
is null. - Throws:
IOException
- Thrown if the response body (entity) cannot be converted to a String value.
-
-