Class DefaultResponse
- java.lang.Object
-
- com.synopsys.integration.rest.response.DefaultResponse
-
-
Field Summary
-
Fields inherited from interface com.synopsys.integration.rest.response.Response
LAST_MODIFIED_FORMAT, LAST_MODIFIED_HEADER_KEY
-
-
Constructor Summary
Constructors Constructor Description DefaultResponse(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.impl.client.CloseableHttpClient client, org.apache.http.client.methods.CloseableHttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.apache.http.client.methods.CloseableHttpResponsegetActualResponse()java.io.InputStreamgetContent()java.lang.StringgetContentEncoding()java.lang.LonggetContentLength()java.lang.StringgetContentString()java.lang.StringgetContentString(java.nio.charset.Charset encoding)java.lang.StringgetContentType()java.util.Map<java.lang.String,java.lang.String>getHeaders()java.lang.StringgetHeaderValue(java.lang.String name)longgetLastModified()org.apache.http.client.methods.HttpUriRequestgetRequest()intgetStatusCode()java.lang.StringgetStatusMessage()booleanisStatusCodeError()booleanisStatusCodeSuccess()voidthrowExceptionForError()
-
-
-
Method Detail
-
getRequest
public org.apache.http.client.methods.HttpUriRequest getRequest()
- Specified by:
getRequestin interfaceResponse
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceResponse
-
isStatusCodeSuccess
public boolean isStatusCodeSuccess()
- Specified by:
isStatusCodeSuccessin interfaceResponse
-
isStatusCodeError
public boolean isStatusCodeError()
- Specified by:
isStatusCodeErrorin interfaceResponse
-
getStatusMessage
public java.lang.String getStatusMessage()
- Specified by:
getStatusMessagein interfaceResponse
-
getContent
public java.io.InputStream getContent() throws com.synopsys.integration.exception.IntegrationException- Specified by:
getContentin interfaceResponse- Throws:
com.synopsys.integration.exception.IntegrationException
-
getContentString
public java.lang.String getContentString() throws com.synopsys.integration.exception.IntegrationException- Specified by:
getContentStringin interfaceResponse- Throws:
com.synopsys.integration.exception.IntegrationException
-
getContentString
public java.lang.String getContentString(java.nio.charset.Charset encoding) throws com.synopsys.integration.exception.IntegrationException- Specified by:
getContentStringin interfaceResponse- Throws:
com.synopsys.integration.exception.IntegrationException
-
getContentLength
public java.lang.Long getContentLength()
- Specified by:
getContentLengthin interfaceResponse
-
getContentEncoding
public java.lang.String getContentEncoding()
- Specified by:
getContentEncodingin interfaceResponse
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentTypein interfaceResponse
-
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
- Specified by:
getHeadersin interfaceResponse
-
getHeaderValue
public java.lang.String getHeaderValue(java.lang.String name)
- Specified by:
getHeaderValuein interfaceResponse
-
getActualResponse
public org.apache.http.client.methods.CloseableHttpResponse getActualResponse()
- Specified by:
getActualResponsein interfaceResponse
-
close
public void close() throws java.io.IOException
-
getLastModified
public long getLastModified() throws com.synopsys.integration.exception.IntegrationException- Specified by:
getLastModifiedin interfaceResponse- Throws:
com.synopsys.integration.exception.IntegrationException
-
throwExceptionForError
public void throwExceptionForError() throws IntegrationRestException- Specified by:
throwExceptionForErrorin interfaceResponse- Throws:
IntegrationRestException
-
-