/** * Handles a {@link RequestStartTransactionAcceptedCommand}. * * @param command the command which needs to be applied to the ChargingStation. */ @CommandHandler public void handle(RequestStartTransactionAcceptedCommand command) { apply(new RequestStartTransactionAcceptedEvent(command.getChargingStationId(), command.getEvseId(), command.getIdentifyingToken(), command.getIdentityContext())); }
public void informRequestStartTransactionAccepted(ChargingStationId chargingStationId, EvseId evseId, IdentifyingToken identifyingToken, IdentityContext identityContext, CorrelationToken correlationToken) { CommandMessage commandMessage = asCommandMessage(new RequestStartTransactionAcceptedCommand(chargingStationId, evseId, identifyingToken, identityContext)); if (correlationToken != null) { commandMessage = commandMessage.andMetaData(Collections.singletonMap(CorrelationToken.KEY, correlationToken)); } commandGateway.send(commandMessage); }