Interface CommandHandler
- All Known Implementing Classes:
BroadcastHandler
,CoalescingWrites
,LoggingHandler
,SanityChecker
,VisitorHandler
@ProviderType
public interface CommandHandler
The
CommandHandler
is the mechanism through which a CommandStream
can be processed synchronously, as the stream is
written.-
Method Details
-
onEmit
Allows this handler to process theCommand
that was just written into the stream to which this handler was attached.- Parameters:
command
- the received command
-
onError
Allows this handler to process error states.- Parameters:
errorMessage
- the error's message
-
onDone
void onDone()This method is called when the stream has been closed. The contract is that after this call, no other commands or errors will be emitted.
-