Class WebhookImmediateRetryOutboundServiceFacade

    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 destination
        retryTemplate - 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: OutboundServiceFacade
        Method orchestrates the services to build the payload and to integrate with restful endpoint.
        Specified by:
        send in interface OutboundServiceFacade
        Parameters:
        itemModel - the model to be converted
        integrationObjectCode - the name of the integration object to convert this model as payload
        destination - 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 implementation DefaultOutboundServiceFacade. The send action will be attempted twice in case of server error failure, that throws WebhookRetryableException to trigger the retry mechanism.
        Specified by:
        send in interface OutboundServiceFacade
        Parameters:
        params - SyncParameters object 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