@Override public void handle(UnlockEvseRequestedEvent event, CorrelationToken correlationToken) { LOG.info("UnlockEvseRequestedEvent"); ocppJsonService.unlockEvse(event.getChargingStationId(), event.getEvseId(), correlationToken); }
@EventHandler public void handle(UnlockEvseRequestedEvent event, @MetaData(CorrelationToken.KEY) CorrelationToken correlationToken) { LOG.info("UnlockEvseRequestedEvent"); OcppRequestHandler ocppRequestHandler = getOcppRequestHandler(event.getChargingStationId()); if (ocppRequestHandler != null) { ocppRequestHandler.handle(event, correlationToken); } }
@CommandHandler public void handle(RequestUnlockEvseCommand command, MetaData metaData) { checkCommandAllowed(command.getIdentityContext(), command.getClass()); checkCommunicationAllowed(); if (command.getEvseId().getNumberedId() > numberOfEvses) { apply(new EvseNotFoundEvent(id, command.getEvseId(), command.getIdentityContext()), metaData); } else { if (command.getEvseId() == Evse.ALL) { for (int i = 1; i <= numberOfEvses; i++) { apply(new UnlockEvseRequestedEvent(id, protocol, new EvseId(i), command.getIdentityContext()), metaData); } } else { apply(new UnlockEvseRequestedEvent(id, protocol, command.getEvseId(), command.getIdentityContext()), metaData); } } }
@Override public void handle(UnlockEvseRequestedEvent event, CorrelationToken correlationToken) { LOG.info("UnlockEvseRequestedEvent"); RequestResult requestResult = chargingStationOcpp15Client.unlockConnector(event.getChargingStationId(), event.getEvseId()); switch (requestResult) { case SUCCESS: domainService.informUnlockEvse(event.getChargingStationId(), event.getEvseId(), correlationToken, addOnIdentity); break; case FAILURE: LOG.info("Failed to unlock evse {} on chargingstation {}", event.getEvseId(), event.getChargingStationId().getId()); break; default: throw new AssertionError(String.format("Unkown unlock evse response status: '%s'", requestResult)); } }
@Override public void handle(UnlockEvseRequestedEvent event, CorrelationToken correlationToken) { LOG.info("OCPP 1.2 UnlockEvseRequestedEvent"); RequestResult requestResult = chargingStationOcpp12Client.unlockConnector(event.getChargingStationId(), event.getEvseId()); switch (requestResult) { case SUCCESS: domainService.informUnlockEvse(event.getChargingStationId(), event.getEvseId(), correlationToken, addOnIdentity); break; case FAILURE: LOG.info("Failed to unlock evse {} on chargingstation {}", event.getEvseId(), event.getChargingStationId().getId()); break; default: throw new AssertionError(String.format("Unknown unlock evse response status: '%s'", requestResult)); } }