Class WebhookImmediateRetryOutboundServiceFacade
- java.lang.Object
-
- de.hybris.platform.webhookservices.service.impl.WebhookImmediateRetryOutboundServiceFacade
-
- All Implemented Interfaces:
OutboundServiceFacade
public class WebhookImmediateRetryOutboundServiceFacade extends java.lang.Object implements OutboundServiceFacade
Implements theOutboundServiceFacadeinterface with theSimpleRetryPolicyto enable resending in case of server error failures. The actual sending is delegated to the default implementationDefaultOutboundServiceFacade.
-
-
Constructor Summary
Constructors Constructor Description WebhookImmediateRetryOutboundServiceFacade(@NotNull OutboundServiceFacade outboundServiceFacade, @NotNull org.springframework.retry.support.RetryTemplate retryTemplate)Constructs a new WebhookOutboundServiceFacade.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>>send(ItemModel itemModel, java.lang.String integrationObjectCode, java.lang.String destination)Method orchestrates the services to build the payload and to integrate with restful endpoint.rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>>send(SyncParameters params)Method orchestrates the services to build the payload and to integrate with restful endpoint.
-
-
-
Constructor Detail
-
WebhookImmediateRetryOutboundServiceFacade
public WebhookImmediateRetryOutboundServiceFacade(@NotNull @NotNull OutboundServiceFacade outboundServiceFacade, @NotNull @NotNull org.springframework.retry.support.RetryTemplate retryTemplate)Constructs a new WebhookOutboundServiceFacade.- Parameters:
outboundServiceFacade- OutboundServiceFacade used to send the event out to the destinationretryTemplate- RetryTemplate to enable resending in case of getting server errors
-
-
Method Detail
-
send
public rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>> send(ItemModel itemModel, java.lang.String integrationObjectCode, java.lang.String destination)
Description copied from interface:OutboundServiceFacadeMethod orchestrates the services to build the payload and to integrate with restful endpoint.- Specified by:
sendin interfaceOutboundServiceFacade- Parameters:
itemModel- the model to be convertedintegrationObjectCode- the name of the integration object to convert this model as payloaddestination- endpoint destination information- Returns:
- rx.Observable which allows the caller to subscribe the callback method
-
send
public rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>> send(SyncParameters params)
Method orchestrates the services to build the payload and to integrate with restful endpoint. The webhook retry template delegates the sending to the default implementationDefaultOutboundServiceFacade. The send action will be attempted twice in case of server error failure, that throwsWebhookRetryableExceptionto trigger the retry mechanism.- Specified by:
sendin interfaceOutboundServiceFacade- Parameters:
params-SyncParametersobject which contains the information relevant to perform an outbound request action, containing the item, integration object and destination- Returns:
- Observable
> with the response from the outbound request
-
-