dnet-applications/apps/dhp-broker-application/src/main/java/eu/dnetlib/broker/events/manager/EventManagerFactory.java

33 lines
1019 B
Java
Raw Normal View History

2020-09-04 14:33:19 +02:00
package eu.dnetlib.broker.events.manager;
2020-07-02 08:55:42 +02:00
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
2020-09-04 14:33:19 +02:00
import eu.dnetlib.broker.common.elasticsearch.Event;
import eu.dnetlib.broker.common.elasticsearch.EventRepository;
import eu.dnetlib.broker.common.elasticsearch.NotificationRepository;
import eu.dnetlib.broker.common.subscriptions.SubscriptionRepository;
import eu.dnetlib.broker.events.output.DispatcherManager;
import eu.dnetlib.broker.utils.LbsQueue;
2020-07-02 08:55:42 +02:00
@Component
public class EventManagerFactory {
@Autowired
private EventRepository eventRepository;
@Autowired
private NotificationRepository notificationRepository;
@Autowired
private SubscriptionRepository subscriptionRepo;
@Autowired
private DispatcherManager dispatcherManager;
public EventManager newEventManager(final LbsQueue<String, Event> queue) {
return new EventManager(this.eventRepository, this.notificationRepository, this.subscriptionRepo, this.dispatcherManager, queue);
}
}