Package org.jboss.weld.events
Interface WeldNotificationOptions
-
- All Superinterfaces:
javax.enterprise.event.NotificationOptions
public interface WeldNotificationOptions extends javax.enterprise.event.NotificationOptionsTheEvent.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
-
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 javax.enterprise.event.NotificationOptionswithParallelMode()static javax.enterprise.event.NotificationOptionswithTimeout(long timeout)
-
-
-
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 javax.enterprise.event.NotificationOptions withParallelMode()
- Returns:
- notification options with "weld.async.notification.mode" set to
WeldNotificationOptions.NotificationMode.PARALLEL
-
withTimeout
static javax.enterprise.event.NotificationOptions withTimeout(long timeout)
- Parameters:
timeout- The timeout in milliseconds- Returns:
- notification options with "weld.async.notification.timeout" set
-
-