CSP for Java
(JCSP) 1.0-rc4

jcsp.plugNplay
Class Substitute

java.lang.Object
  |
  +--jcsp.plugNplay.Substitute
All Implemented Interfaces:
CSProcess

public class Substitute
extends Object
implements CSProcess

Substitutes a user-configured Object for each Object in the stream flowing through.

Process Diagram

         ________________
    in  |                | out
   -->--| Substitute (o) |-->--
        |________________|
 

Description

Substitute is a process that substitutes the (Object) o with which it is configured for everything recieved on its in channel. So, its output stream repeats the same Object but its rate of flow is triggered by its input.

Channel Protocols

Input Channels
in java.lang.Object The in Channel can accept data of any Class.
Output Channels
out java.lang.Object The object to be sent down the Channel.

Author:
P.D.Austin

Constructor Summary
Substitute(ChannelInput in, ChannelOutput out, Object o)
          Construct a new Substitute process.
 
Method Summary
 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
 

Constructor Detail

Substitute

public Substitute(ChannelInput in,
                  ChannelOutput out,
                  Object o)
Construct a new Substitute process.
Parameters:
o - the Object to be sent down the out Channel.
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

CSP for Java
(JCSP) 1.0-rc4

Submit a bug or feature to jcsp-team@ukc.ac.uk
Version 1.0-rc4 of the JCSP API Specification (Copyright 1997-2000 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.