Package ptolemy.actor

Class SubscriberPort

  • All Implemented Interfaces:
    java.lang.Cloneable, Initializable, HasTypeConstraints, Typeable, Changeable, Debuggable, DebugListener, Derivable, HierarchyListener, ModelErrorHandler, MoMLExportable, Moveable, Nameable
    Direct Known Subclasses:
    SubscriptionAggregatorPort

    public class SubscriberPort
    extends PubSubPort
    This is a specialized input port that subscribes to data sent to it on the specified named channel. The tokens are "tunneled" from an instance of PublisherPort that names the same channel. If PubSubPort.global is false (the default), then this subscriber will only see instances of PublisherPort that are under the control of the same director. That is, it can be at a different level of the hierarchy, or in an entirely different composite actor, as long as the relevant composite actors are transparent (have no director). If PubSubPort.global is true, then the publisher may be anywhere in the model, as long as its global parameter is also true.

    Any number of instances of SubscriberPort can subscribe to the same channel.

    This actor actually has a hidden input port that is connected to the publisher via hidden "liberal links" (links that are allowed to cross levels of the hierarchy). Consequently, any data dependencies that the director might assume on a regular "wired" connection will also be assumed across Publisher-Subscriber pairs. Similarly, type constraints will propagate across Publisher-Subscriber pairs. That is, the type of the Subscriber output will match the type of the Publisher input.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Edward A. Lee, Contributor: Christopher Brooks
    Pt.AcceptedRating:
    Red (eal)
    Pt.ProposedRating:
    Yellow (eal)