public class StringResponseHandler extends java.lang.Object implements HttpResponseHandler<ApiServiceResponse<java.lang.String>>
| Constructor and Description |
|---|
StringResponseHandler()
Creates
StringResponseHandler to handle response. |
StringResponseHandler(Unmarshaller<java.lang.String,java.io.InputStream> responseUnmarshaller)
Creates
StringResponseHandler to handle response. |
| Modifier and Type | Method and Description |
|---|---|
ApiServiceResponse<java.lang.String> |
handle(HttpResponse<?> httpResponse)
Accepts an HTTP response object, and returns an object of type T.
|
boolean |
needsConnectionLeftOpen() |
public StringResponseHandler()
StringResponseHandler to handle response.public StringResponseHandler(Unmarshaller<java.lang.String,java.io.InputStream> responseUnmarshaller)
StringResponseHandler to handle response.responseUnmarshaller - the given response unmarshaller.public ApiServiceResponse<java.lang.String> handle(HttpResponse<?> httpResponse) throws java.lang.Exception
HttpResponseHandlerhandle in interface HttpResponseHandler<ApiServiceResponse<java.lang.String>>httpResponse - The HTTP response to handle, as received from request.java.lang.Exception - If any problems are encountered handling the response.public boolean needsConnectionLeftOpen()
needsConnectionLeftOpen in interface HttpResponseHandler<ApiServiceResponse<java.lang.String>>true if this response handler requires that the
underlying HTTP connection be left open, and not automatically
closed, otherwise false.