Skip to content
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

Merged
merged 1 commit into from
Mar 29, 2017
Merged

Conversation

mkouba
Copy link
Member

@mkouba mkouba commented Mar 28, 2017

To discuss:

  • I decided not to introduce a NotificationOptions subinterface but a final class with constants instead - I can see no value of having a Weld-specific impl
  • I'm not sure about the class name though
  • all option keys have org.jboss.weld.async.notification prefix, maybe it's too long, I just wanted to have it clear
  • note the org.jboss.weld.events package name -> due to JDK9 package clash

@mkouba mkouba requested review from tremes and manovotn March 28, 2017 12:27
* @author Martin Kouba
* @see Event#fireAsync(Object, NotificationOptions)
*/
public final class AsyncNotifications {
Copy link
Contributor

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.

Copy link
Member Author

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...

Copy link
Contributor

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";
Copy link
Contributor

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

Copy link
Member Author

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 {
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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

@mkouba mkouba changed the title WELD-2359 Introduce AsyncNotifications WELD-2359 Introduce WeldNotificationsOptions Mar 28, 2017
@mkouba mkouba merged commit 09df740 into weld:master Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants