An interface between components
is a set of operations performed by a hardware or software element
in the system.
A component realizes an interface if it
supports the interface; another component then uses that interface.
Interfaces promote design modularity; components are more easily replaceable
when they use interfaces instead of directly depending on components.
Component interfaces can be seen only in a component diagram. They
cannot be viewed in the browser. A component diagram supports only
interfaces between components.
Procedure
- Click the Interface button
in
the Diagram Tools.
- Click once in the diagram, or click-and-drag
to create the component interface.
- By default, IBM® Rational® Rhapsody® creates
an interface named Interface_n, where n is
an integer value starting with 0. If wanted, rename the interface.
The following example shows a component interface. The product adds
the «Interface» stereotype automatically.