Ports
Description
Ports are the only interfaces of actors. A port has always a protocol assigned. Service Access Points (SAP) and Service Provision Points (SPP) are specialized ports that are used to define layering.
Motivation
-
Ports decouple interface definition (protocols) from interface usage
-
Ports decouple the logical interface from the transport
Notation
Class Ports
Ports that define an external interface of the actor class, are defined in the Interface. Ports that define an internal interface are defined in the Structure (e.g. internal ports).
-
External end ports are defined in the Interface and in the Structure
-
Internal end ports are only defined in the Structure
-
Relay ports are only defined in the Interface
-
End ports are always connected to the internal behavior of the ActorClass
-
Replicated ports can be defined with a fixed replication factor, e.g.
Port port18 [5]: ProtocolClass1
or a variable replication factor, e.g.
Port port18[*]: ProtocolClass1
-
The graphical symbols of Interface ports are drawn on the border of the actor class. The graphical symbols of Structure ports are drawn inside the border of an actor class.
-
Ports have two types of connection preferences:
optional
andmandatory
. By default, all ports areoptional
. If a port is defined with themandatory
keyword, it will be checked that the each port instance is connected through a binding. If it is not connected, a warning will be shown at the corresponding ActorClass definition. Below is an example of how to define a mandatory port. This keyword needs to be specified at the beginning of the port definition. Ports may also explicitly be marked to have an optional binding using theoptional
keyword. We strongly encourage explicitly marking all ports as optional or mandatory.
ActorClass AnActor {
Interface {
optional Port relayPort: ProtocolClass
}
Structure {
mandatory conjugated Port internalPort: ProtocolClass
}
}
An example warning has shown for mandatory Internal Port connection:
The table below shows all kinds of class ports with textual and graphical notation:
Element | Graphical Notation | Textual Notation |
---|---|---|
Class End Port |
External Class End Port:
Internal Class End Port:
| |
Conjugated Class End Port |
External Conjugated Class End Port:
Internal Conjugated Class End Port:
| |
Class Relay Port |
| |
Conjugated Class Relay Port |
| |
Replicated Class End Port |
External Replicated Class End Port:
Internal Replicated Class End Port:
| |
Conjugated Replicated Class End Port |
External Conjugated Replicated Class End Port:
Internal Conjugated Replicated Class End Port:
| |
Replicated Class Relay Port |
| |
Conjugated Replicated Class Relay Port |
|
Reference Ports
These symbols can only appear on the border of an actor class reference. Since the type of port is defined in the respective actor class, no textual notation for the Reference Ports exists.
The table below shows all kinds of reference ports with textual and graphical notation:
Element | Graphical Notation | Textual Notation |
---|---|---|
Reference Port | implicit | |
Conjugated Reference Port | implicit | |
Replicated Reference Port | implicit | |
Conjugated Replicated Reference Port | implicit |