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 EthosResponsebuildEthosResponse(org.apache.http.HttpResponse httpResponse)Builds anEthosResponseobject from the givenorg.apache.http.HttpResponse.
-
-
-
Method Detail
-
buildEthosResponse
public EthosResponse buildEthosResponse(org.apache.http.HttpResponse httpResponse) throws IOException
Builds anEthosResponseobject from the givenorg.apache.http.HttpResponse. The headerList is built taking header values from the givenorg.apache.http.HttpResponsefor the headers listed inEthosResponse. Also copies the response body content and Http status code.- Parameters:
httpResponse- Theorg.apache.http.HttpResponseto build anEthosResponsefrom.- Returns:
- An
EthosResponsecontaining the headers values from the givenorg.apache.http.HttpResponsefor the headers defined inEthosResponse, the response body content, and the response Http status code, or null if the givenorg.apache.http.HttpResponseis null. - Throws:
IOException- Thrown if the response body (entity) cannot be converted to a String value.
-
-