Artifact: Protocol
This artifact specifies the communication pattern used between capsules. Communication between capsules is accomplished by sending messages to the capsule's port. The protocol class defines the messages that can be sent or received from a capsule port.
Work Product Kinds: Model Element
Main Description

Protocols allow the specification for a set of Artifact: Capsule ports to be defined and reused. The protocol defines a set of incoming and outgoing message types (e.g. operations, signals), and optionally a collaboration (usually consisting of a set of sequence diagrams, see Guideline: Sequence Diagram) which defines the required ordering of messages, and a state machine (described by a set of statechart diagrams, see Guideline: Statechart Diagram) which specifies the abstract behavior that the participants in a protocol must provide.

A protocol is a specification of desired behavior that can take place over a connector -- an explicit specification of the contractual agreement between the participants in the protocol. It is pure behavior and does not specify any structural elements. A protocol comprises a set of participants, each of which plays a specific role in the protocol.

Each such protocol role is specified by a unique name and a set of signals that are received by that role as well as the set of signals that are sent by that role (either set could be empty). As an option, a protocol can also have a specification of the valid communication sequences; a state machine may specify this. Finally, a protocol may also have a set of prototypical interaction sequences (these can be shown as sequence diagrams). These must conform to the protocol state machine, if one is defined.

Binary protocols, involving just two participants, are by far the most common and the simplest to specify. One advantage of these protocols is that only one role, called the base role, needs to be specified. The other, called the conjugate, can be derived from the base role simply by inverting the incoming and outgoing signal sets. This inversion operation is known as conjugation.

Composition of Protocol Class

Composition of <<protocol>> class.

As noted in above figure, a protocol typically contains one or more sequence diagrams which illustrate the valid message exchange sequences specified by the protocol. The protocol also consists of a set of incoming (request) messages and a set of outgoing (response) messages. An optional state machine can be used to specify the behavior that participants in the protocol must support.

Representation OptionsUML Representation: Class, stereotyped as <<protocol>>. Note that this representation is based on UML 1.5 notation. Much of this can be represented in UML 2.0 using the Concept: Structured Class.  Refer to Differences Between UML 1.x and UML 2.0 for more information.
More Information