Signals, Triggers, and Events


A signal is a notification of some kind that an object dispatches asynchronously to one or more other objects. The attributes of a signal serve as its parameters.

Figure 6-1 indicates the following ways to show a signal using UML:

  • As a standard stereotype label attached to a class

  • As part of a list within an extra compartment attached to the bottom of a class box


Figure 6-1: Signals

A reception is a declaration that a particular class or interface (see the section "Interfaces, Ports, and Connectors" in Chapter 1) is prepared to react to the receipt of a given signal. Figure 6-2 shows the notation for a reception.


Figure 6-2: Reception

You indicate the transmission of a signal with the "send" stereotype attached to a dependency arrow. (The send dependency is a type of usage dependency; see the section "Dependencies" in Chapter 2.) Within Figure 6-3, the login operation sends a signal to the SecurityManager object once the current user has tried unsuccessfully three times to log in to the system.


Figure 6-3: Send dependency

When the SecurityManager object is ready to deal with the signal, the object invokes its handleThreeStrikes method on itself.

A trigger represents an occurrence of an event, which is something of significance to one or more objects that may cause the execution of some behavior associated with the object(s).

The UML defines the following four kinds of triggers:

  • A call trigger represents the reception of a request to call a specific operation belonging to a given class (which becomes a call on a method on an object that represents an instance of that class).

  • A change trigger represents an event that occurs when a Boolean expression becomes True as a result of a change in value of one or more attributes or associations. You express a change event using the word when (for example, when midnight or when maximumLoops =100 ).

  • A signal trigger represents the reception of a particular signal.

  • A time trigger represents an event that occurs after a specified period of time. You express a time event using the word after followed by an expression of absolute or relative time (for example, after 5 seconds or after [15 minutes since last keyboard or mouse action] ).




Fast Track Uml 2.0
Fast Track UML 2.0
ISBN: 1590593200
EAN: 2147483647
Year: 2004
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net