Guest User

Untitled

a guest
Jul 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. package no.lavoapp.service;
  2.  
  3. import no.lavoapp.domain.User;
  4. import no.lavoapp.domain.Video;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.scheduling.annotation.Async;
  7. import org.springframework.stereotype.Service;
  8.  
  9. @Service
  10. public class EventService {
  11.  
  12. private NotificationService notificationService;
  13.  
  14. @Autowired
  15. public EventService(NotificationService notificationService) {
  16. this.notificationService = notificationService;
  17. }
  18.  
  19. @Async
  20. public void videoResponseCreated(User originator, Video video) {
  21. notificationService.videoResponse(originator, video);
  22. }
  23.  
  24. @Async
  25. public void videoCreated(User originator, Video video) {
  26. notificationService.videoCreated(originator, video);
  27. }
  28.  
  29. @Async
  30. public void sendNotificationForVideo(Video video) {
  31. notificationService.sendNotificationForVideo(video);
  32. }
  33. }
Add Comment
Please, Sign In to add comment