onCommand<C extends DwActionCommand<Object?>> method

void onCommand<C extends DwActionCommand<Object?>>(
  1. DwFakeHandler<C> handle
)

Answers commands of type C. A command runs once per idempotency key; a repeat answers the stored outcome unless it failed.

Implementation

void onCommand<C extends DwActionCommand<Object?>>(DwFakeHandler<C> handle) {
  _commands[C] = (command, call) => handle(command as C, call);
}