Class DefaultOutboundRequestResponseInterceptor
java.lang.Object
de.hybris.platform.outboundservices.monitoring.DefaultOutboundRequestResponseInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class DefaultOutboundRequestResponseInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected StringextractError(org.springframework.http.client.ClientHttpResponse response) protected StringextractMessageId(org.springframework.http.HttpRequest request) protected OutboundRequestModelfindOutboundRequest(String messageId) protected FlexibleSearchServiceprotected MediaPersistenceServiceprotected ModelServiceprotected OutboundServicesConfigurationprotected OutboundRequestMediaModelgetPayload(byte[] payload, String messageId) protected org.springframework.http.client.ClientHttpResponsehandleError(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse) protected org.springframework.http.client.ClientHttpResponsehandleSuccess(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse) org.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] payload, org.springframework.http.client.ClientHttpRequestExecution requestExecution) voidsetErrorParsers(List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>> errorParsers) voidsetExceptionErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> exceptionErrorParser) voidsetFallbackErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> fallbackErrorParser) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetMediaPersistenceService(MediaPersistenceService mediaPersistenceService) voidsetModelService(ModelService modelService) voidsetOutboundServicesConfiguration(OutboundServicesConfiguration outboundServicesConfiguration) voidsetTimeoutService(TimeoutService timeoutService) protected voidupdateOutboundRequestWithException(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, Throwable t) protected org.springframework.http.client.ClientHttpResponseupdateOutboundRequestWithResponse(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse)
-
Field Details
-
OUTBOUND_REQ_CANNOT_BE_UPDATED_WITHOUT_UNIQUE_ITEM
- See Also:
-
-
Constructor Details
-
DefaultOutboundRequestResponseInterceptor
public DefaultOutboundRequestResponseInterceptor()
-
-
Method Details
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] payload, org.springframework.http.client.ClientHttpRequestExecution requestExecution) throws IOException - Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Throws:
IOException
-
updateOutboundRequestWithException
protected void updateOutboundRequestWithException(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, Throwable t) -
updateOutboundRequestWithResponse
protected org.springframework.http.client.ClientHttpResponse updateOutboundRequestWithResponse(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse) throws IOException - Throws:
IOException
-
extractMessageId
-
findOutboundRequest
-
handleError
protected org.springframework.http.client.ClientHttpResponse handleError(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse) throws IOException - Throws:
IOException
-
handleSuccess
protected org.springframework.http.client.ClientHttpResponse handleSuccess(OutboundRequestModel outboundRequestModel, byte[] payload, String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse) -
extractError
protected String extractError(org.springframework.http.client.ClientHttpResponse response) throws IOException - Throws:
IOException
-
extractError
-
getPayload
-
getModelService
-
setModelService
-
getFlexibleSearchService
-
setFlexibleSearchService
-
getMediaPersistenceService
-
setMediaPersistenceService
-
getErrorParsers
-
setErrorParsers
public void setErrorParsers(List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>> errorParsers) -
getFallbackErrorParser
-
setFallbackErrorParser
public void setFallbackErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> fallbackErrorParser) -
getExceptionErrorParser
-
setExceptionErrorParser
public void setExceptionErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> exceptionErrorParser) -
getOutboundServicesConfiguration
-
setOutboundServicesConfiguration
public void setOutboundServicesConfiguration(OutboundServicesConfiguration outboundServicesConfiguration) -
setTimeoutService
-