/** * Handles a {@link RequestStopTransactionRejectedCommand}. * * @param command the command which needs to be applied to the ChargingStation. */ @CommandHandler public void handle(RequestStopTransactionRejectedCommand command) { apply(new RequestStopTransactionRejectedEvent(command.getChargingStationId(), command.getTransactionId(), command.getIdentityContext())); }
public void informRequestStopTransactionRejected(ChargingStationId chargingStationId, TransactionId transactionId, IdentityContext identityContext, CorrelationToken correlationToken) { CommandMessage commandMessage = asCommandMessage(new RequestStopTransactionRejectedCommand(chargingStationId, transactionId, identityContext)); if (correlationToken != null) { commandMessage = commandMessage.andMetaData(Collections.singletonMap(CorrelationToken.KEY, correlationToken)); } commandGateway.send(commandMessage); }