Class NotificationListenerManager
- java.lang.Object
-
- org.jbpm.services.task.deadlines.notifications.impl.NotificationListenerManager
-
public class NotificationListenerManager extends Object
Manages broadcasting of notification events to all found listeners
-
-
Field Summary
Fields Modifier and Type Field Description static String
KIE_LISTENER_EXCLUDE
static String
KIE_LISTENER_INCLUDE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
broadcast(org.kie.internal.task.api.model.NotificationEvent event, org.kie.internal.task.api.UserInfo userInfo)
Broadcast given event to all listeners independently meaning catches possible exceptions to avoid breaking notification by listenersvoid
broadcast(org.kie.internal.task.api.TaskContext taskContext, org.kie.internal.task.api.model.NotificationEvent event, org.kie.internal.task.api.UserInfo userInfo)
static NotificationListenerManager
get()
List<NotificationListener>
getNotificationListeners()
static Optional<List<String>>
propertyToList(String propertyName)
void
registerAdditionalNotificationListener(List<NotificationListener> additionalNotificationListener)
void
reset()
-
-
-
Field Detail
-
KIE_LISTENER_EXCLUDE
public static final String KIE_LISTENER_EXCLUDE
- See Also:
- Constant Field Values
-
KIE_LISTENER_INCLUDE
public static final String KIE_LISTENER_INCLUDE
- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
public void reset()
-
registerAdditionalNotificationListener
public void registerAdditionalNotificationListener(List<NotificationListener> additionalNotificationListener)
-
getNotificationListeners
public List<NotificationListener> getNotificationListeners()
-
broadcast
public void broadcast(org.kie.internal.task.api.TaskContext taskContext, org.kie.internal.task.api.model.NotificationEvent event, org.kie.internal.task.api.UserInfo userInfo)
-
broadcast
public void broadcast(org.kie.internal.task.api.model.NotificationEvent event, org.kie.internal.task.api.UserInfo userInfo)
Broadcast given event to all listeners independently meaning catches possible exceptions to avoid breaking notification by listeners- Parameters:
event
- notification event to be sentparams
- additional parameters see NotificationListener.onNotification for details.- See Also:
NotificationListener#onNotification(NotificationEvent, Object...)
-
get
public static NotificationListenerManager get()
-
-