Java警报框架
Java 中是否有任何“警报”(或通知)框架?
在我的网络应用程序中,我希望我们的用户能够配置他们想要接收哪些(可用警报)以及以哪种形式(例如通过电子邮件)接收。
举一个简单的例子,用户选择仅在其订单发货时通过电子邮件收到提醒。
Are there any "Alert" (or Notification) frameworks in Java out there.
In my web application I would like our users to be able to configure which (of the available alerts) they would like to receive and in which (e.g via email) form.
As a simple example, a user chooses to be alerted only via email when his/her order has been shipped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Java/J2EE 中没有任何内容是默认的。 然而,实施起来并不需要太多。 您的订单处理者和其他处理者可以在 processORder 方法上拥有侦听器/观察者。 它们可以处理电子邮件/其他通知。
您甚至可以从 OrderProcessor 发出一条 jms 消息,其中包含有关特定通知的一些信息,并在使用 JMS 消息后向用户发送电子邮件/其他警报。
Nothing comes by default in Java/J2EE. However, it does NOT take much to implement. Your order processor and other processors can have listeners /observers on the processORder method. These can process the email/other notifications.
You can even have a jms message coming out of the OrderProcessor with some info about the particular notification and you send an email/otherAlert to the user after consuming the JMS message.
我们可以使用 JMS 向用户发送通知。
JMS 生产者将警报放入队列中,生产者将处理消息并通过以下方式向用户发送通知。 电子邮件/短信和/或存储在数据库中以在用户仪表板中显示消息。
We can use JMS for sending notifications to users.
JMS producers puts the alerts in queue and producers will process the message and send to notifications to user via. email / sms and/or store in database to show the messages in user dashboards.