public class DriverController
{
private final EndlessConsumer consumer;
- private final AdderRecordHandler adderRecordHandler;
+ private final ApplicationRecordHandler recordHandler;
@PostMapping("start")
public Map<Integer, Map<String, Long>> state()
{
return
- adderRecordHandler
+ recordHandler
.getState()
.entrySet()
.stream()
@GetMapping("state/{user}")
public ResponseEntity<Long> seen(@PathVariable String user)
{
- for (AdderBusinessLogic adderBusinessLogic : adderRecordHandler.getState().values())
+ for (AdderBusinessLogic adder : recordHandler.getState().values())
{
- Optional<Long> sum = adderBusinessLogic.getSum(user);
+ Optional<Long> sum = adder.getSum(user);
if (sum.isPresent())
return ResponseEntity.ok(sum.get());
}