class ServiceContainer implements Runnable {

    @Override
    public void run() {
        LOGGER.trace("Check status {}", service);
        Status status = service.status();
        LOGGER.trace("{} Status is {}", service, status);

        if (status == Service.Status.STOPPED) {
            LOGGER.warn("Service {} is stopped, attempting to start it.", service);
            try {
                LOGGER.debug("Starting service {}", service);
                service.start();
                LOGGER.debug("Started service {}", service);
            } catch (Throwable ex) {
                LOGGER.trace(null, ex);
                LOGGER.error(
                        "Exception thrown : {} While starting service {}",
                        Optional.ofNullable(ex.getCause()).orElse(ex).getMessage(),
                        service);
            }
        }
    }

    public  ServiceContainer(final Service service);
    public  ServiceContainer(
            final Service service,
            final ScheduledExecutorService executorService,
            final long initialDelay,
            final long period);

}