UML中信号和异步操作之间的差异是什么?
制作序列图,我的工具允许交流是同步操作,异步操作和信号。
最后两个关于程序流的区别是什么?
Making sequence diagrams my tool allows for communication that is either synchronous operation, asynchronous operation, and signal.
What's the difference between the last two regarding program flow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
信号 用于异步事件驱动的通信。信号是分类器,描述了它们出现的属性。本身课程并在接收部分中指示他们能够处理的信号,在交互图中,您可以使用这些信号。
在序列图中,使用 消息 :
操作的图形符号和序列图中的信号是相同的。只是信号一定总是异步的。好消息是您可以从一个开始,然后决定切换到另一个,而无需从根本上更改序列图。
没有规则可以使用一个或另一个规则。您可以使用一个或另一个设计非常相似的设计建模。在类型上,您可能更喜欢信号而不是异步操作:
Signals are meant for asynchronous event driven communication. The signals are classifiers, that describe the attributes of their occurence. Classes themselves and indicate in the reception section which signals they are able to process, and in interaction diagrams you can then use these signals.
In a sequence diagram, the communication between two lifelines is achieved using Messages:
The graphical notation for operation and signals in sequence diagrams is the same; it's just that signals are necessarily always asynchronous. The good news is that you can start with one, and decide to switch to the other without fundamentally changing your sequence diagram.
There is no rule to use the one or the other. You could model very similar designs using the one or the other. Typcially, you may prefer signals over asynchronous operations: