Protocol State Machines


A protocol state machine specifies which operations of a given class can be called when instances of that class are in particular states and under which conditions. Thus, a protocol state machine specifies the allowable call sequences on the class's operations.

A protocol state machine is indicated by the {protocol} keyword next to the name on a state machine diagram (see the next section).

A protocol transition specifies that a given operation can be called for an instance of the given class in its initial state, under the initial condition specified as a precondition by a particular guard, and that at the end of the transition, the destination state will be reached under a specified postcondition, also specified as a guard.

The notation for a protocol transition is the same as that for a regular transition, except that a protocol transition does not specify an action.

The behavior of a protocol state machine is directed under an overall policy specified by a protocol conformance. This is the means by which the protocol state machine specifies a protocol that conforms to a more general state machine protocol, or that a specific behavioral state machine abides by the protocol of a more general protocol state machine. In particular, protocol conformance means that every rule and constraint specified for the general protocol state machine ‚ including state invariants, preconditions, and postconditions for the operations it refers to ‚ apply to the specific protocol or behavioral state machine. (An invariant specifies a condition that must always hold true under the relevant circumstances.)




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