Class CacheableResponse

  • All Implemented Interfaces:
    com.synopsys.integration.rest.response.Response, java.io.Closeable, java.lang.AutoCloseable

    public class CacheableResponse
    extends java.lang.Object
    implements com.synopsys.integration.rest.response.Response
    • Constructor Detail

      • CacheableResponse

        public CacheableResponse​(com.synopsys.integration.rest.request.Request request,
                                 com.synopsys.integration.rest.response.Response response,
                                 org.apache.commons.collections4.map.LRUMap<com.synopsys.integration.rest.request.Request,​com.synopsys.integration.rest.response.Response> cache)
    • Method Detail

      • getRequest

        public org.apache.http.client.methods.HttpUriRequest getRequest()
        Specified by:
        getRequest in interface com.synopsys.integration.rest.response.Response
      • getStatusCode

        public int getStatusCode()
        Specified by:
        getStatusCode in interface com.synopsys.integration.rest.response.Response
      • isStatusCodeSuccess

        public boolean isStatusCodeSuccess()
        Specified by:
        isStatusCodeSuccess in interface com.synopsys.integration.rest.response.Response
      • isStatusCodeError

        public boolean isStatusCodeError()
        Specified by:
        isStatusCodeError in interface com.synopsys.integration.rest.response.Response
      • getStatusMessage

        public java.lang.String getStatusMessage()
        Specified by:
        getStatusMessage in interface com.synopsys.integration.rest.response.Response
      • getContent

        public java.io.InputStream getContent()
                                       throws com.synopsys.integration.exception.IntegrationException
        Specified by:
        getContent in interface com.synopsys.integration.rest.response.Response
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • getContentString

        public java.lang.String getContentString()
                                          throws com.synopsys.integration.exception.IntegrationException
        Specified by:
        getContentString in interface com.synopsys.integration.rest.response.Response
        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:
        getContentString in interface com.synopsys.integration.rest.response.Response
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • getContentLength

        public java.lang.Long getContentLength()
        Specified by:
        getContentLength in interface com.synopsys.integration.rest.response.Response
      • getContentEncoding

        public java.lang.String getContentEncoding()
        Specified by:
        getContentEncoding in interface com.synopsys.integration.rest.response.Response
      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface com.synopsys.integration.rest.response.Response
      • getHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Specified by:
        getHeaders in interface com.synopsys.integration.rest.response.Response
      • getHeaderValue

        public java.lang.String getHeaderValue​(java.lang.String name)
        Specified by:
        getHeaderValue in interface com.synopsys.integration.rest.response.Response
      • getActualResponse

        public org.apache.http.client.methods.CloseableHttpResponse getActualResponse()
        Specified by:
        getActualResponse in interface com.synopsys.integration.rest.response.Response
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface com.synopsys.integration.rest.response.Response
        Throws:
        java.io.IOException
      • getLastModified

        public long getLastModified()
                             throws com.synopsys.integration.exception.IntegrationException
        Specified by:
        getLastModified in interface com.synopsys.integration.rest.response.Response
        Throws:
        com.synopsys.integration.exception.IntegrationException
      • throwExceptionForError

        public void throwExceptionForError()
                                    throws com.synopsys.integration.rest.exception.IntegrationRestException
        Specified by:
        throwExceptionForError in interface com.synopsys.integration.rest.response.Response
        Throws:
        com.synopsys.integration.rest.exception.IntegrationRestException