Package org.jboss.weld.events
Interface WeldNotificationOptions
- All Superinterfaces:
jakarta.enterprise.event.NotificationOptions
public interface WeldNotificationOptions
extends jakarta.enterprise.event.NotificationOptions
The
Event.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 ClassesNested classes/interfaces inherited from interface jakarta.enterprise.event.NotificationOptions
jakarta.enterprise.event.NotificationOptions.Builder -
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic jakarta.enterprise.event.NotificationOptionsstatic jakarta.enterprise.event.NotificationOptionswithTimeout(long timeout) Methods inherited from interface jakarta.enterprise.event.NotificationOptions
get, getExecutor
-
Field Details
-
MODE
Makes it possible to specify that observer methods should be notified in parallel (if supported). -
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:
-
-
Method Details
-
withParallelMode
static jakarta.enterprise.event.NotificationOptions withParallelMode()- Returns:
- notification options with "weld.async.notification.mode" set to
WeldNotificationOptions.NotificationMode.PARALLEL
-
withTimeout
static jakarta.enterprise.event.NotificationOptions withTimeout(long timeout) - Parameters:
timeout- The timeout in milliseconds- Returns:
- notification options with "weld.async.notification.timeout" set
-