View Javadoc

1   package org.jumpmind.symmetric.service.jmx;
2   
3   import javax.management.Notification;
4   
5   import org.jumpmind.symmetric.service.INotificationService;
6   import org.springframework.jmx.export.annotation.ManagedResource;
7   import org.springframework.jmx.export.notification.NotificationPublisher;
8   import org.springframework.jmx.export.notification.NotificationPublisherAware;
9   
10  @ManagedResource(description = "Provide an implementation of SymmetricDS notifications by JMX")
11  public class NotificationService implements NotificationPublisherAware, INotificationService {
12  
13      NotificationPublisher notificationPublisher;
14  
15      public void setNotificationPublisher(NotificationPublisher notificationPublisher) {
16          this.notificationPublisher = notificationPublisher;
17      }
18  
19      public void sendNotification(Notification event) {
20          this.notificationPublisher.sendNotification(event);
21      }
22  
23  }