Class DefaultOutboundRequestResponseInterceptor

  • All Implemented Interfaces:
    org.springframework.http.client.ClientHttpRequestInterceptor

    public class DefaultOutboundRequestResponseInterceptor
    extends java.lang.Object
    implements org.springframework.http.client.ClientHttpRequestInterceptor
    • Field Detail

      • OUTBOUND_REQ_CANNOT_BE_UPDATED_WITHOUT_UNIQUE_ITEM

        public static final java.lang.String OUTBOUND_REQ_CANNOT_BE_UPDATED_WITHOUT_UNIQUE_ITEM
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultOutboundRequestResponseInterceptor

        public DefaultOutboundRequestResponseInterceptor()
    • Method Detail

      • intercept

        public org.springframework.http.client.ClientHttpResponse intercept​(org.springframework.http.HttpRequest request,
                                                                            byte[] payload,
                                                                            org.springframework.http.client.ClientHttpRequestExecution requestExecution)
                                                                     throws java.io.IOException
        Specified by:
        intercept in interface org.springframework.http.client.ClientHttpRequestInterceptor
        Throws:
        java.io.IOException
      • updateOutboundRequestWithException

        protected void updateOutboundRequestWithException​(OutboundRequestModel outboundRequestModel,
                                                          byte[] payload,
                                                          java.lang.String messageId,
                                                          java.lang.Throwable t)
      • updateOutboundRequestWithResponse

        protected org.springframework.http.client.ClientHttpResponse updateOutboundRequestWithResponse​(OutboundRequestModel outboundRequestModel,
                                                                                                       byte[] payload,
                                                                                                       java.lang.String messageId,
                                                                                                       org.springframework.http.client.ClientHttpResponse clientHttpResponse)
                                                                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • extractMessageId

        protected java.lang.String extractMessageId​(org.springframework.http.HttpRequest request)
      • findOutboundRequest

        protected OutboundRequestModel findOutboundRequest​(java.lang.String messageId)
      • handleError

        protected org.springframework.http.client.ClientHttpResponse handleError​(OutboundRequestModel outboundRequestModel,
                                                                                 byte[] payload,
                                                                                 java.lang.String messageId,
                                                                                 org.springframework.http.client.ClientHttpResponse clientHttpResponse)
                                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • handleSuccess

        protected org.springframework.http.client.ClientHttpResponse handleSuccess​(OutboundRequestModel outboundRequestModel,
                                                                                   byte[] payload,
                                                                                   java.lang.String messageId,
                                                                                   org.springframework.http.client.ClientHttpResponse clientHttpResponse)
      • extractError

        protected java.lang.String extractError​(org.springframework.http.client.ClientHttpResponse response)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • extractError

        protected java.lang.String extractError​(java.lang.Throwable t)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)
      • setMediaPersistenceService

        public void setMediaPersistenceService​(MediaPersistenceService mediaPersistenceService)
      • setOutboundServicesConfiguration

        public void setOutboundServicesConfiguration​(OutboundServicesConfiguration outboundServicesConfiguration)