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