Package com.easydesk.notification
Class NotificationManagerFactory
java.lang.Object
com.easydesk.notification.NotificationManagerFactory
설정된 BatchManager/QueueManager 구현을 돌려주는 factory.
Spring 전환: Class.forName(...).newInstance() + Turbine AnnotationProcessor 로 구현 class 이름을
설정(easydesk.notification.batch.manager.classname)에서 읽던 방식을 없애고, Spring 에 등록된 bean 중에서
이름으로 고른다.
easydesk.notification.batch.manager=batchNotificationManager # 기본값 # 또는 easydesk.notification.batch.manager=batchNotificationByActivitySetManager easydesk.notification.queue.manager=queueManager # 기본값
Torque 기동을 기다리던 busy-wait 는 제거했다. 이 factory 는 bean 을 요청 시점에만 조회하고, 실제 DB 접근은 batch 가 실행될 때 일어난다.
- Author:
- Youncho Cho
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationManagerFactory(Map<String, BatchManager> batchManagers, Map<String, QueueManager> queueManagers, String batchManagerName, String queueManagerName) -
Method Summary
Modifier and TypeMethodDescriptionReturns the currently configured BatchManager.Returns the currently configured NotificationManager.Returns the currently configured QueueManager.
-
Constructor Details
-
NotificationManagerFactory
@Autowired public NotificationManagerFactory(Map<String, BatchManager> batchManagers, Map<String, QueueManager> queueManagers, @Value("${easydesk.notification.batch.manager:batchNotificationManager}") String batchManagerName, @Value("${easydesk.notification.queue.manager:queueManager}") String queueManagerName)
-
-
Method Details
-
getNotificationManager
Returns the currently configured NotificationManager. -
getBatchManager
Returns the currently configured BatchManager.- Throws:
IllegalStateException- 설정한 이름의 bean 이 없을 때
-
getQueueManager
Returns the currently configured QueueManager.- Throws:
IllegalStateException- 설정한 이름의 bean 이 없을 때
-