All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jcsp.util.buildingblocks.FixedDelay

java.lang.Object
   |
   +----jcsp.util.buildingblocks.FixedDelay

public final class FixedDelay
extends Object
implements CSProcess

Process Diagram

         ____________
    in  |            | out
   -->--| FixedDelay |-->--
        |____________|
 

Description

The FixedDelay class is a process which has an infinite loop that waits a Object of any type to be sent down the in Channel. The process then sleeps for a time equal to the delayTime in milliseconds and then writes the same reference down the out Channel.

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 will send the data as the same type as sent down the in Channel.

Author:
P.D.Austin

Constructor Index

 o FixedDelay(long, ChannelInput, ChannelOutput)
Construct a new FixedDelay process with the input Channel in and the output Channel out.

Method Index

 o run()
The main body of this process.

Constructors

 o FixedDelay
 public FixedDelay(long delayTime,
                   ChannelInput in,
                   ChannelOutput out)
Construct a new FixedDelay process with the input Channel in and the output Channel out.

Parameters:
delayTime - The time the process is to wait in milliseconds between receiving a message and then sending it.
in - The input Channel
out - The output Channel

Methods

 o run
 public void run()
The main body of this process.


All Packages  Class Hierarchy  This Package  Previous  Next  Index