如何在UML序列图中表示监听器 [英] How to represent Listeners in UML sequence diagram

查看:1400
本文介绍了如何在UML序列图中表示监听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在序列图中,您将如何表示事件触发的侦听器?
这不仅仅是一个常规的方法调用,所以这样的显示似乎不正确。

In sequence diagrams, how would you represent an event triggered listener? It is not just a regular method call, so displaying like that would not seem correct.

我尝试制作一个包含JMS的系统的序列图监听器。我可以通过系统的send()调用启动生命线到JMS队列(显示系统调用send()作为业务角色),或者我可以在onMessage()调用时启动生命线。 (将JMS队列显示为业务角色)
或者我应该忽略图中的整个JMS队列?

I try to make a sequence diagram of a system including a JMS listener. I could start the lifeline with the send() call of the system to the JMS queue (displaying the system calling send() as a business actor), or I could start the lifeline at the onMessage() call. (displaying JMS Queue as a business actor) Or should I just ignore the whole JMS Queue in the diagram?

它的价值:我正在使用Astah社区创建图表。

For what it's worth: I'm using Astah Community to create the diagrams.

推荐答案

如果您使用事件或显式方法通常并不重要呼叫。
您的观众是什么?您如何为JMS水箱建模?我认为JMS Listener只是另一个演员,如果你的观众处于需求级别,我只会使用一个事件(序列图中的消息通常可以是各种类型,如事件,消息或方法致电)。

It is usually not important if you either use an "event" or an explicit "method call". What is your audience and how do you model the JMS listern? I would assume the JMS Listener is just another actor, and if your audience is on the "requirements" level I would simply use an event (a message in a sequence diagram usually can be of various "types" like event, message, or method call).

这篇关于如何在UML序列图中表示监听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆