Package org.jcsp.lang

Class TaggedProtocol

    • Field Detail

      • tag

        public final int tag
        This public tag is used by the receiving process to determine which variant of a tagged protocol has been received. See the above Consumer example (and the definition of its input channel's SampleProtocol).
    • Constructor Detail

      • TaggedProtocol

        public TaggedProtocol​(int tag)
        This super-constructor is invoked by the extending sub-class constructor. It should be passed a tag that is unique for the tagged protocol for which that sub-class is one variant. See the above SampleProtocol (and its use in Producer and Consumer).