public Trigger.Builder notification(String destination, String type, String configuration) { final Notification notification = new Notification(); notification.setDestination(destination); notification.setType(type); notification.setConfiguration(configuration); notifications.add(notification); return this; }
final Notification notification = new Notification(); notification.setType("email"); notification.setDestination(ownerEmail);
@Override public CompletableFuture<Void> send(final Notification notification, final Map<String, Object> parameters) { final CompletableFuture[] futures = new CompletableFuture[notifiers.size()]; int index = 0; for (final Notifier notifier : notifiers) { futures[index++] = notifier.send(notification, parameters); } return CompletableFuture.allOf(futures); }
final Notification notification = new Notification(); notification.setType("email"); notification.setDestination(ownerEmail);