Class DefaultOutboundRequestResponseInterceptor
- java.lang.Object
-
- de.hybris.platform.outboundservices.monitoring.DefaultOutboundRequestResponseInterceptor
-
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class DefaultOutboundRequestResponseInterceptor extends java.lang.Object implements org.springframework.http.client.ClientHttpRequestInterceptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultOutboundRequestResponseInterceptor.WrappedClientHttpResponse
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOUTBOUND_REQ_CANNOT_BE_UPDATED_WITHOUT_UNIQUE_ITEM
-
Constructor Summary
Constructors Constructor Description DefaultOutboundRequestResponseInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringextractError(java.lang.Throwable t)protected java.lang.StringextractError(org.springframework.http.client.ClientHttpResponse response)protected java.lang.StringextractMessageId(org.springframework.http.HttpRequest request)protected OutboundRequestModelfindOutboundRequest(java.lang.String messageId)protected java.util.List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>>getErrorParsers()protected MonitoredRequestErrorParser<MonitoredRequestErrorModel>getExceptionErrorParser()protected MonitoredRequestErrorParser<MonitoredRequestErrorModel>getFallbackErrorParser()protected FlexibleSearchServicegetFlexibleSearchService()protected MediaPersistenceServicegetMediaPersistenceService()protected ModelServicegetModelService()protected OutboundServicesConfigurationgetOutboundServicesConfiguration()protected OutboundRequestMediaModelgetPayload(byte[] payload, java.lang.String messageId)protected org.springframework.http.client.ClientHttpResponsehandleError(OutboundRequestModel outboundRequestModel, byte[] payload, java.lang.String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse)protected org.springframework.http.client.ClientHttpResponsehandleSuccess(OutboundRequestModel outboundRequestModel, byte[] payload, java.lang.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(java.util.List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>> errorParsers)voidsetExceptionErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> exceptionErrorParser)voidsetFallbackErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> fallbackErrorParser)voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetMediaPersistenceService(MediaPersistenceService mediaPersistenceService)voidsetModelService(ModelService modelService)voidsetOutboundServicesConfiguration(OutboundServicesConfiguration outboundServicesConfiguration)protected voidupdateOutboundRequestWithException(OutboundRequestModel outboundRequestModel, byte[] payload, java.lang.String messageId, java.lang.Throwable t)protected org.springframework.http.client.ClientHttpResponseupdateOutboundRequestWithResponse(OutboundRequestModel outboundRequestModel, byte[] payload, java.lang.String messageId, org.springframework.http.client.ClientHttpResponse clientHttpResponse)
-
-
-
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
-
-
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:
interceptin interfaceorg.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)
-
getPayload
protected OutboundRequestMediaModel getPayload(byte[] payload, java.lang.String messageId)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
getMediaPersistenceService
protected MediaPersistenceService getMediaPersistenceService()
-
setMediaPersistenceService
public void setMediaPersistenceService(MediaPersistenceService mediaPersistenceService)
-
getErrorParsers
protected java.util.List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>> getErrorParsers()
-
setErrorParsers
public void setErrorParsers(java.util.List<MonitoredRequestErrorParser<MonitoredRequestErrorModel>> errorParsers)
-
getFallbackErrorParser
protected MonitoredRequestErrorParser<MonitoredRequestErrorModel> getFallbackErrorParser()
-
setFallbackErrorParser
public void setFallbackErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> fallbackErrorParser)
-
getExceptionErrorParser
protected MonitoredRequestErrorParser<MonitoredRequestErrorModel> getExceptionErrorParser()
-
setExceptionErrorParser
public void setExceptionErrorParser(MonitoredRequestErrorParser<MonitoredRequestErrorModel> exceptionErrorParser)
-
getOutboundServicesConfiguration
protected OutboundServicesConfiguration getOutboundServicesConfiguration()
-
setOutboundServicesConfiguration
public void setOutboundServicesConfiguration(OutboundServicesConfiguration outboundServicesConfiguration)
-
-