@Override
    public void stop() {
        // Stop all futures
        LOGGER.info("Stopping scraper...");
        for (Map.Entry<ScraperTask, ScheduledFuture<?>> entry : scraperTaskMap.entries()) {
            LOGGER.debug("Stopping task {}...", entry.getKey());
            entry.getValue().cancel(true);
        }
        // Clear the map
        scraperTaskMap.clear();

        // Stop the statistics logger, if it is currently running.
        cancelLoggingFuture(jobsLogger);
        cancelLoggingFuture(tasksLogger);
        if((statisticsLogger != null) && (!statisticsLogger.isCancelled())) {
            statisticsLogger.cancel(false);
        }
    }
Register a task as MBean
@param task task to register
plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/TriggeredScraperImpl.java