Class BatchReleaseStrategy

All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<StartedOutboundSyncEvent>

public class BatchReleaseStrategy extends AbstractEventListener<StartedOutboundSyncEvent>
Defines a release strategy to be used when aggregating OutboundItemDTOGroups. It is responsible for determining if the aggregation is complete.
  • Constructor Details

  • Method Details

    • canMessagesBeReleased

      @ReleaseStrategy public boolean canMessagesBeReleased(Collection<OutboundItemDTOGroup> itemDTOGroups)
      Determines if a list of itemDTOGroups can be released from aggregation.
      Parameters:
      itemDTOGroups - list of item groups to be aggregated
      Returns:
      true if the aggregation can be released, false if not
    • onEvent

      protected void onEvent(StartedOutboundSyncEvent startedOutboundSyncEvent)
      Description copied from class: AbstractEventListener
      This method is called by ApplicationListener.onApplicationEvent(ApplicationEvent) and processes the given event.
      Specified by:
      onEvent in class AbstractEventListener<StartedOutboundSyncEvent>
      Parameters:
      startedOutboundSyncEvent - the event to be processed
      See Also:
      • ApplicationListener.onApplicationEvent(ApplicationEvent)