use of io.spine.client.CommandFactory in project core-java by SpineEventEngine.
the class InvalidProjectNameSubscriber method on.
@Subscribe
public void on(InvalidProjectName rejection, RjUpdateProjectName commandMessage, CommandContext context) {
final CommandFactory commandFactory = TestActorRequestFactory.newInstance(InvalidProjectNameSubscriber.class).command();
final Command command = commandFactory.createWithContext(commandMessage, context);
this.rejectionHandled = Rejections.createRejection(rejection, command);
}
use of io.spine.client.CommandFactory in project core-java by SpineEventEngine.
the class AbstractCommandRouter method produceCommand.
private Command produceCommand(Message commandMessage) {
final CommandContext sourceContext = source.getContext();
final CommandFactory commandFactory = commandFactory(sourceContext);
final Command result = commandFactory.createBasedOnContext(commandMessage, sourceContext);
return result;
}
Aggregations