Class WebhookImmediateRetryOutboundServiceFacade
java.lang.Object
de.hybris.platform.webhookservices.service.impl.WebhookImmediateRetryOutboundServiceFacade
- All Implemented Interfaces:
OutboundServiceFacade
public class WebhookImmediateRetryOutboundServiceFacade
extends Object
implements OutboundServiceFacade
Implements the
OutboundServiceFacade interface with the SimpleRetryPolicy
to enable resending in case of server error failures.
The actual sending is delegated to the default implementation DefaultOutboundServiceFacade.-
Constructor Summary
ConstructorsConstructorDescriptionWebhookImmediateRetryOutboundServiceFacade(@NotNull OutboundServiceFacade outboundServiceFacade, @NotNull org.springframework.retry.support.RetryTemplate retryTemplate) Constructs a new WebhookOutboundServiceFacade. -
Method Summary
Modifier and TypeMethodDescriptionrx.Observable<org.springframework.http.ResponseEntity<Map>>Method orchestrates the services to build the payload and to integrate with restful endpoint.rx.Observable<org.springframework.http.ResponseEntity<Map>>send(SyncParameters params) Method orchestrates the services to build the payload and to integrate with restful endpoint.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.outboundservices.facade.OutboundServiceFacade
sendBatch
-
Constructor Details
-
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 Details
-
send
public rx.Observable<org.springframework.http.ResponseEntity<Map>> send(ItemModel itemModel, String integrationObjectCode, 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
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<ResponseEntity < Map>> with the response from the outbound request
-