Package org.jcsp.lang

Class ChannelOutputImpl<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void poison​(int strength)
      This injects poison into the channel.
      void write​(T object)
      Write an Object to the channel.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChannelOutputImpl

        ChannelOutputImpl​(ChannelInternals _channel,
                          int _immunity)
    • Method Detail

      • write

        public void write​(T object)
        Description copied from interface: ChannelOutput
        Write an Object to the channel.
        Specified by:
        write in interface ChannelOutput<T>
        Parameters:
        object - the object to write to the channel
      • poison

        public void poison​(int strength)
        Description copied from interface: Poisonable
        This injects poison into the channel. If the channel was not explicitly constructed to be poisonable or if the strength of poison is not greater than the channel immunity level, the poison will have no effect.
        Specified by:
        poison in interface Poisonable
        Parameters:
        strength - the strength of the poison (must be >= 0).