Interface OutboundSyncEventHandler<T extends OutboundSyncEvent>
-
- All Known Implementing Classes:
AbortedOutboundSyncEventHandler,CompletedOutboundSyncEventHandler,IgnoredOutboundSyncEventHandler,StartedOutboundSyncEventHandler,SystemErrorOutboundSyncEventHandler
public interface OutboundSyncEventHandler<T extends OutboundSyncEvent>Handler for calculating anOutboundSyncStatebased on aOutboundSyncEventand, if it exists, aOutboundSyncStatewith the previous status.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<T>getHandledEventClass()Returns 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 Detail
-
getHandledEventClass
java.lang.Class<T> 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.
-
-