-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WELD-2359 Introduce WeldNotificationsOptions #59
Conversation
* @author Martin Kouba | ||
* @see Event#fireAsync(Object, NotificationOptions) | ||
*/ | ||
public final class AsyncNotifications { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I don't think it's an appropriate name. What about AsyncNotificationOptions
then? Or AsyncEventOptions
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 for AsyncNotificationOptions
which would indicate a subinterface/impl of NotificationOptions
.
I'm not sure about AsyncEventOptions
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think AsyncNotificationOptions
is better.
* | ||
* @see NotificationMode | ||
*/ | ||
public static final String MODE = "org.jboss.weld.async.notification.mode"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go only with weld.async.notification.mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
* @author Martin Kouba | ||
* @see Event#fireAsync(Object, NotificationOptions) | ||
*/ | ||
public final class AsyncNotifications { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think AsyncNotificationOptions
is better.
|
||
/** | ||
* | ||
* @param timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should note that this is in milliseconds.
public static final String MODE = "org.jboss.weld.async.notification.mode"; | ||
|
||
/** | ||
* Makes it possible to specify a timeout after which the returned completion stage must be complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should elaborate on the possible cases? E.g. when you get exception and what exception because you might be handling multiple exceptions in you exceptionally
block.
/** | ||
* Makes it possible to specify a timeout after which the returned completion stage must be complete. | ||
* <p> | ||
* Timeout expiration does not abort the notification of the observers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor thing, I would rather say Time expiration
To discuss:
I decided not to introduce aNotificationOptions
subinterface but a final class with constants instead - I can see no value of having a Weld-specific implall option keys haveorg.jboss.weld.async.notification
prefix, maybe it's too long, I just wanted to have it clearorg.jboss.weld.events
package name -> due to JDK9 package clash