In composite structure diagrams, you can define interfaces to specify
the types of interactions that occur in a port and to communicate the requirements
and expectations of properties in the containing classifier. Required interfaces,
which have a usage relationship from a class to an interface, specify the
requests that a classifier can make to its environment through a port. Provided
interfaces, which have an implementation relationship from a class to an interface,
specify the requests that the environment can make to a classifier through
a port.
In the Modeling perspective, open
a composite structure diagram that contains a port and a diagram that contains
classes and interfaces.
To define a required and a provided interface on a port:
- In the diagram editor, click a port.
- In the Properties view, click the General tab.
- On the General page, in the Type column,
click Select Type.
- In the Select Element window, complete one
of the following steps:
- To define a required interface, type the port to a class that has
a usage relationship to an interface.
- To define a provided interface, type the port to an interface or to
a class that has an implementation relationship to an interface.
- Click OK.