Port
ptolemy.kernel.Port

A Port is the interface of an Entity to any number of Relations. Normally, a Port is contained by an Entity, although a port may exist with no container. The role of a port is to aggregate a set of links to relations. Thus, for example, to represent a directed graph, entities can be created with two ports, one for incoming arcs and one for outgoing arcs. More generally, the arcs to an entity may be divided into any number of subsets, with one port representing each subset.

A Port can link to any instance of Relation. Derived classes may wish to constrain links to a subclass of Relation. To do this, subclasses should override the protected method _checkLink(Relation) to throw an exception if its argument is a relation that is not of the appropriate subclass. Similarly, if a subclass wishes to constrain the containers of the port to be of a subclass of Entity, they should override the protected method _checkContainer(Entity).

Author(s): Mudit Goel, Edward A. Lee, Jie Liu
Version:$Id: Port.java,v 1.167 2005/10/24 19:09:11 cxh Exp $
Pt.Proposed Rating:Green (eal)
Pt.Accepted Rating:Green (cxh)