package de.ivu.elect.business.system.control;

import java.util.List;

import javax.inject.Inject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.ivu.elect.business.system.entity.SystemLogQuelle;
import de.ivu.elect.jee.startup.PostStartup;
import de.ivu.elect.jee.startup.PostStartupAsync;

/**
 *  on 31.10.2016.
 */
public class BackgroundServiceEventPostStartup implements PostStartupAsync {

  private static final Logger LOG = LoggerFactory.getLogger(BackgroundServiceEventPostStartup.class);

  @Inject
  private transient BackgroundServiceEventStarter backgroundServiceEventStarter;

  @Override
  public void postStartup() {
    LOG.info("Sende events für Hintergrunddienste");
    List<SystemLogQuelle> events = backgroundServiceEventStarter.sendeBackgroundServiceEvents();
    LOG.info("Sende events für Hintergrunddienste - done " + events);
  }
}
