Class FixedDelay

  • All Implemented Interfaces:
    CSProcess

    public final class FixedDelay
    extends java.lang.Object
    implements CSProcess
    This process copies input to output, imposing a fixed time delay between these events.

    Process Diagram

    Description

    This process copies input to output, imposing a fixed time delay between these events. Note that this does not imply that the rate of output will be regular, since that depends on the rate of input and the rate at which output taken. To impose a regular rate of output, see Regulate.

    Channel Protocols

    Input Channels
    in java.lang.Object The in Channel can accept data of any Class.
    Output Channels
    out java.lang.Object The out Channel sends the the same type of data (in fact, the same data) as is input.
    See Also:
    Regulate, Regular
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long delayTime
      The time the process is to wait in milliseconds between receiving a message and then sending it.
      private ChannelInput in
      The input Channel
      private ChannelOutput out
      The output Channel
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedDelay​(long delayTime, ChannelInput in, ChannelOutput out)
      This process copies input to output, imposing a fixed time delay between these events.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      The main body of this process.
      • Methods inherited from class java.lang.Object

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

      • delayTime

        private long delayTime
        The time the process is to wait in milliseconds between receiving a message and then sending it.
    • Constructor Detail

      • FixedDelay

        public FixedDelay​(long delayTime,
                          ChannelInput in,
                          ChannelOutput out)
        This process copies input to output, imposing a fixed time delay between these events.
        Parameters:
        delayTime - the time the process is to wait in milliseconds between receiving a message and then sending it – a zero or negative value implies no waiting.
        in - the input Channel
        out - the output Channel
    • Method Detail

      • run

        public void run()
        The main body of this process.
        Specified by:
        run in interface CSProcess