@Override public void handle(ChangeChargingStationAvailabilityToOperativeRequestedEvent event, @MetaData(CorrelationToken.KEY) CorrelationToken correlationToken) { LOG.info("OCPP 1.2 ChangeChargingStationAvailabilityToOperativeRequestedEvent"); EvseId chargingStationEvseId = new EvseId(0); RequestResult requestResult = chargingStationOcpp12Client.changeAvailabilityToOperative(event.getChargingStationId(), chargingStationEvseId); switch (requestResult) { case SUCCESS: domainService.changeChargingStationAvailabilityToOperative(event.getChargingStationId(), correlationToken, addOnIdentity); break; case FAILURE: LOG.info("Failed to set availability of chargingstation {} to operative", event.getChargingStationId().getId()); break; default: throw new AssertionError(String.format("Unknown status for change availability to operative: '%s'", requestResult)); } }
@CommandHandler public void handle(RequestChangeChargingStationAvailabilityToOperativeCommand command, MetaData metaData) { checkCommandAllowed(command.getIdentityContext(), command.getClass()); checkCommunicationAllowed(); apply(new ChangeChargingStationAvailabilityToOperativeRequestedEvent(this.id, this.protocol, command.getIdentityContext()), metaData); }
@Override public void handle(ChangeChargingStationAvailabilityToOperativeRequestedEvent event, @MetaData(CorrelationToken.KEY) CorrelationToken correlationToken) { LOG.info("OCPP 1.5 ChangeChargingStationAvailabilityToOperativeRequestedEvent"); EvseId chargingStationEvseId = new EvseId(0); RequestResult requestResult = chargingStationOcpp15Client.changeAvailabilityToOperative(event.getChargingStationId(), chargingStationEvseId); switch (requestResult) { case SUCCESS: domainService.changeChargingStationAvailabilityToOperative(event.getChargingStationId(), correlationToken, addOnIdentity); break; case FAILURE: LOG.info("Failed to set availability of chargingstation {} to operative", event.getChargingStationId().getId()); break; default: throw new AssertionError(String.format("Unkown status for change availability to operative: '%s'", requestResult)); } }
@Override public void handle(ChangeChargingStationAvailabilityToOperativeRequestedEvent event, @MetaData(CorrelationToken.KEY) CorrelationToken correlationToken) { ocppJsonService.changeAvailability(event.getChargingStationId(), new EvseId(0), Changeavailability.Type.OPERATIVE, correlationToken); }
@EventHandler public void handle(ChangeChargingStationAvailabilityToOperativeRequestedEvent event, @MetaData(CorrelationToken.KEY) CorrelationToken correlationToken) { OcppRequestHandler ocppRequestHandler = getOcppRequestHandler(event.getChargingStationId()); if (ocppRequestHandler != null) { ocppRequestHandler.handle(event, correlationToken); } }