Interface CommandHandler
-
@ProviderType public interface CommandHandler
TheCommandHandler
is the mechanism through which aCommandStream
can be processed synchronously, as the stream is written.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDone()
This method is called when the stream has been closed.void
onEmit(Command command)
Allows this handler to process theCommand
that was just written into the stream to which this handler was attached.void
onError(java.lang.String errorMessage)
Allows this handler to process error states.
-
-
-
Method Detail
-
onEmit
void onEmit(Command command)
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
void onError(java.lang.String errorMessage)
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.
-
-