Interface OutboundSyncEventHandler<T extends OutboundSyncEvent>

All Known Implementing Classes:
AbortedOutboundSyncEventHandler, CompletedOutboundSyncEventHandler, IgnoredOutboundSyncEventHandler, StartedOutboundSyncEventHandler, SystemErrorOutboundSyncEventHandler

public interface OutboundSyncEventHandler<T extends OutboundSyncEvent>
Handler for calculating an OutboundSyncState based on a OutboundSyncEvent and, if it exists, a OutboundSyncState with the previous status.
  • Method Details

    • getHandledEventClass

      Class<T> getHandledEventClass()
      Returns the type of event that can be handled.
      Returns:
      the OutboundSyncEvent type class that the handler can handle.
    • handle

      @NotNull @NotNull OutboundSyncState handle(@NotNull T event, @NotNull @NotNull OutboundSyncState currentState)
      Handles the event and creates a new OutboundSyncState that is calculated based on the information received in a OutboundSyncEvent and the current state if it exists.
      Parameters:
      event - OutboundSyncEvent containing initial information about a synchronization job.
      currentState - OutboundSyncState with the current status of the sync job if it has already been started.
      Returns:
      a new OutboundSyncState calculated from the parameters received.