Previous | UML Classes | Table of Contents | UML Packages | Next |
Specifies a link that enables communication between two or more instances. This link may be an instance of an association,
or it may represent the possibility of the instances being able to communicate because their identities are known by virtue
of being passed in as parameters, held in variables or slots, or because the communicating instances are the same instance.
The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast
to associations, which specify links between any instance of the associated classifiers, connectors specify links between
instances playing the connected parts only.
•
Feature (from Kernel ) on page 70
Each connector may be attached to two or more connectable elements, each representing a set of instances. Each connector end
is distinct in the sense that it plays a distinct role in the communication realized over a connector. The communications
realized over a connector may be constrained by various constraints (including type constraints) that apply to the attached
connectable elements.
No additional attributes
• end: ConnectorEnd [2..*] A connector consists of at least two connector ends, each representing the participation of instances of the classifiers typing the connectable elements attached to this end. The set of connector ends is ordered.(SubsetsElement::ownedElement)
• type: Association [0..1] An optional association that specifies the link corresponding to this connector.
• redefinedConnector: Connector [0..*] A connector may be redefined when its containing classifier is specialized. The redefining connector may have a type that specializes the type of the redefined connector. The types of the connector ends of the redefining connector may specialize the types of the connector ends of the redefined connector. The properties of the connector ends of the redefining connector may be replaced. (Subsets Element::redefinedElement)
[1] The types of the connectable elements that the ends of a connector are attached to must conform to the types of the
association ends of the association that types the connector, if any.
[2] The connectable elements attached to the ends of a connector must be compatible.
[3] The ConnectableElement s attached as roles to each ConnectorEnd owned by a Connector must be roles of the Classifier that
owned the Connector, or they must be ports of such roles.
If a connector between two roles of a classifier is a feature of an instantiable classifier, it declares that a link may exist
within an instance of that classifier. If a connector between two roles of a classifier is a feature of an uninstantiable
classifier, it declares that links may exist within an instance of the classifier that realizes the original classifier. These
links will connect instances corresponding to the parts joined by the connector.
Issue 8031 -Clarify destruction semantics.
Links corresponding to connectors may be created upon the creation of the instance of the containing classifier (see StructuredClassifier
on page 190). All such links corresponding to connectors are destroyed, when the containing
classifier instance is destroyed.
If the type of the connector is omitted, the type is inferred based on the connector, as follows: If the type of a role (i.e,
the connectable element attached to a connector end) realizes an interface that has a unique association to another interface
which is realized by the type of another role (or an interface compatible to that interface is realized by the type of another
role), then that association is the type of the connector between these parts. If the connector realizes a collaboration (that
is, a collaboration use maps the connector to a connector in an associated collaboration through role bindings), then the
type of the connector is an anonymous association with association ends corresponding to each connector end. The type of each
association end is the classifier that realizes the parts connected to the matching connector in the collaboration. Any adornments
on the connector ends (either the original connector or the connector in the collaboration) specify adornments of the ends
of the inferred association. Otherwise, the type of the connector is an anonymously named association with association ends
corresponding to each connector end. The type of each association end is the type of the part that each corresponding connector
end is attached to. Any adornments on the connector ends specify adornments of the ends of the inferred association. Any inferred
associations are always bidirectionally navigable and are owned by the containing classifier.
What makes connectable elements compatible is a semantic variation point.
A connector is drawn using the notation for association (see Association (from Kernel ) on page 37). The optional name
string of the connector obeys the following syntax:
( [ name ] ‘:’ <classname> ) | <name>
where <name> is the name of the connector, and <classname> is the name of the association that is its type. A stereotype keyword
within guillemets may be placed above or in front of the connector name. A property string may be placed after or below the
connector name.
Examples are shown in StructuredClassifier on page 190.
Connector has been added in UML 2.0. The UML 1.4 concept of association roles is subsumed by connectors.