import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@RequiredArgsConstructor
public class DriverController
{
- private final EndlessConsumer consumer;
-
-
@PostMapping("start")
public void start()
{
- consumer.start();
}
@PostMapping("stop")
public void stop() throws ExecutionException, InterruptedException
{
- consumer.stop();
}
@GetMapping("seen")
- public Map<Integer, Map<String, Integer>> seen()
+ public Map<Integer, Map<String, Long>> seen()
{
- return consumer.getSeen();
+ return new HashMap<>();
}
@ExceptionHandler