What is the difference between?
Self message Recursive message Re-entrant message
thanks
I'm talking about the sequence diagram where you have two main options of elements for interaction. One is called message (which I assume you're calling signal) and the other is called call. Ok, but if that's the difference is only in being synchronous or asynchronous, why can I set both messages and calls to be sync/async?
The following is an example of a sequence diagram: Messages – Communication between objects is depicted using messages. The messages appear in a sequential order on the lifeline. We represent messages using arrows. Lifelines and messages form the core of a sequence diagram.
The collaboration diagram also comes under the UML representation which is used to visualize the organization of the objects and their interaction. The sequence diagram are used to represent the sequence of messages that are flowing from one object to another.
The messages appear in a sequential order on the lifeline. We represent messages using arrows. Lifelines and messages form the core of a sequence diagram. Synchronous messages – A synchronous message waits for a reply before the interaction can move forward.
A Self Message is a type of message which represents the execution or operation call in the same object lifeline.
A recursive message is a type of self message that is executed recursively.
A re-entrant message is where you have an object A and and oject B.
The call that B makes to A is called a re-entrant message.
Hope that makes sense!!!
The result of a call to E function is used to complete a call to another function in the same lifeline with the E function.
Example: Function Main from lifeline of ControllerC object colect data from EvaluateStudent function (located in StudentC scope) in order to use it as parameter for a call to another function also located in the same scope of StudentC. It is importent that the calls to be performed from outside the scope of StudentC. In our case the calls are performed from ControllerC.
public StudentC
{
public function int EvaluateStudent(object student)
{
/*... perform complex evaluation here ...*/
}
public function int IsTopStudents(int score, int acceptanceLevel)
{
return(score > acceptanceLevel);
}
}
public ControllerC{
Public function Main()
{
IsTopStudent(EvaluateStudent(student), 8);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With