Package org.jboss.weld.events
Interface WeldNotificationOptions
-
- All Superinterfaces:
NotificationOptions
public interface WeldNotificationOptions extends NotificationOptions
TheEvent.fireAsync(Object, NotificationOptions)method allows to configure the notification of asynchronous observer methods.Weld defines the following non-portable options:
- Since:
- 3.0
- Author:
- Martin Kouba
- See Also:
Event.fireAsync(Object, NotificationOptions)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classWeldNotificationOptions.NotificationMode-
Nested classes/interfaces inherited from interface javax.enterprise.event.NotificationOptions
NotificationOptions.Builder
-
-
Field Summary
Fields Modifier and Type Field Description static StringMODEMakes it possible to specify that observer methods should be notified in parallel (if supported).static StringTIMEOUTMakes it possible to specify a timeout (in milliseconds) after which the returned completion stage must be completed.
-
Method Summary
Static Methods Modifier and Type Method Description static NotificationOptionswithParallelMode()static NotificationOptionswithTimeout(long timeout)-
Methods inherited from interface javax.enterprise.event.NotificationOptions
get, getExecutor
-
-
-
-
Field Detail
-
MODE
static final String MODE
Makes it possible to specify that observer methods should be notified in parallel (if supported).
-
TIMEOUT
static final String TIMEOUT
Makes it possible to specify a timeout (in milliseconds) after which the returned completion stage must be completed.If the time expires the stage is completed exceptionally with a
CompletionExceptionholding theTimeoutExceptionas its cause. The expiration does not abort the notification of the observers.- See Also:
- Constant Field Values
-
-
Method Detail
-
withParallelMode
static NotificationOptions withParallelMode()
- Returns:
- notification options with "weld.async.notification.mode" set to
WeldNotificationOptions.NotificationMode.PARALLEL
-
withTimeout
static NotificationOptions withTimeout(long timeout)
- Parameters:
timeout- The timeout in milliseconds- Returns:
- notification options with "weld.async.notification.timeout" set
-
-