Class WebhookEventToItemSender
- java.lang.Object
-
- de.hybris.platform.webhookservices.service.impl.WebhookEventToItemSender
-
- All Implemented Interfaces:
WebhookEventSender
public final class WebhookEventToItemSender extends java.lang.Object implements WebhookEventSender
Default implementation of theWebhookEventSender. This implementation uses theOutboundServiceFacadeto do the actual posting to the destination because the OutboundServiceFacade already provides item to JSON conversion, and monitoring.
-
-
Constructor Summary
Constructors Constructor Description WebhookEventToItemSender(@NotNull OutboundServiceFacade outboundServiceFacade, @NotNull WebhookConfigurationService webhookConfigurationService, @NotNull ModelService modelService)Instantiates the WebhookEventToItemSender
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsend(EventSourceData eventSourceData)Sends the given eventvoidsetFilterService(WebhookFilterService service)Injects an optional filter service to be used by this item sender.
-
-
-
Constructor Detail
-
WebhookEventToItemSender
public WebhookEventToItemSender(@NotNull @NotNull OutboundServiceFacade outboundServiceFacade, @NotNull @NotNull WebhookConfigurationService webhookConfigurationService, @NotNull @NotNull ModelService modelService)Instantiates the WebhookEventToItemSender- Parameters:
outboundServiceFacade- OutboundServiceFacade used to send the event out to the destinationwebhookConfigurationService- WebhookConfigurationService used to look upWebhookConfigurationModelmodelService- ModelService used to look upItemModel
-
-
Method Detail
-
send
public void send(EventSourceData eventSourceData)
Description copied from interface:WebhookEventSenderSends the given event- Specified by:
sendin interfaceWebhookEventSender- Parameters:
eventSourceData- Context of the event to be sent
-
setFilterService
public void setFilterService(WebhookFilterService service)
Injects an optional filter service to be used by this item sender. If the webhook filter service is not injected, no item filtering will be performed.- Parameters:
service- an implementation of theWebhookFilterServicethat will execute filtering logic for the items being sent by this item sender.
-
-