6.2 Messages and Stimuli
As discussed in Chapter 2, communication from a sender object to a receiver object via a link is called a stimulus, and communication from a sender class to a receiver class via an association is called a message. A stimulus is an instance of a message much the way an object is an instance of a class and a link is an instance of an association. For example, the objects in Figure 6-5 and Figure 6-7 would exchange stimuli and the classes in Figure 6-4 and Figure 6-6 would exchange messages. The sender object (or class) is known as the client, and the receiver object (or class) is known as the supplier.
Within an interaction and collaboration, messages are exchanged between a sender class role and a receiver class role via an association role, and stimuli are exchanged between a sender object playing a class role and a receiver object playing a class role via a link playing an association role. For example, Figure 6-4 and Figure 6-6 show that class roles would exchange messages via association roles, and Figure 6-5 and Figure 6-7 show that objects playing class roles would exchange stimuli via links playing association roles. As discussed in Chapter 2, in the object-oriented paradigm, communication from a sender to a receiver is used to convey information or request processing.