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 Summary
Modifier and TypeMethodDescriptionReturns the type of event that can be handled.@NotNull OutboundSyncStatehandle(T event, @NotNull OutboundSyncState currentState) Handles the event and creates a newOutboundSyncStatethat is calculated based on the information received in aOutboundSyncEventand the current state if it exists.
-
Method Details
-
getHandledEventClass
Returns the type of event that can be handled.- Returns:
- the
OutboundSyncEventtype class that the handler can handle.
-
handle
@NotNull @NotNull OutboundSyncState handle(@NotNull T event, @NotNull @NotNull OutboundSyncState currentState) Handles the event and creates a newOutboundSyncStatethat is calculated based on the information received in aOutboundSyncEventand the current state if it exists.- Parameters:
event-OutboundSyncEventcontaining initial information about a synchronization job.currentState-OutboundSyncStatewith the current status of the sync job if it has already been started.- Returns:
- a new
OutboundSyncStatecalculated from the parameters received.
-